Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windowless Apps Not Showing in Switcher #4108

Open
darthlite opened this issue Jan 11, 2025 · 13 comments
Open

Windowless Apps Not Showing in Switcher #4108

darthlite opened this issue Jan 11, 2025 · 13 comments
Labels
bug Something isn't working unreproducible Need help from the author to reproduce the issue

Comments

@darthlite
Copy link

Describe the bug

I have "Hide apps with no open window" set to Off. I open an app, close all its windows (but do not quit the app). The app does not show in in the AltTab switcher (I think it did until a few months ago when I first noticed this; I remember I used to quit apps from the switcher all the time by highlighting the app and hitting q).

Screenshots / video

Just to be clear: I have ensured Word has no other windows open on any of the other desktop spaces (other apps do have windows open in other spaces but I have AltTab set to only show apps on current space). I then opened a fresh instance in the new space (one in the video), then closed the window, but not the app.

AltTab.mp4

Steps to reproduce the bug

See video above. Nothing special is required (unless I have messed something up or have something special configured - would appreciate the help to figure out what exactly).

Your environment

  • AltTab version: 7.14.1
  • macOS version: 15.1.1 (24B91)
  • Other relevant info: The demo was generated using
@darthlite darthlite added the bug Something isn't working label Jan 11, 2025
@lwouis
Copy link
Owner

lwouis commented Jan 11, 2025

Hi,

I'm not able to reproduce this issue.

Could you please show the same situation as in the video, and this time right-click on Word in the Dock? Then left-click it?

Also, AltTab was opened before Word, correct?

Thank you

@lwouis lwouis added the unreproducible Need help from the author to reproduce the issue label Jan 11, 2025
@surajk16
Copy link

I face this issue as well. This feature was working so well up until Jan 3 for me after which I switched to a new mac and now things stopped working.

@lwouis
Copy link
Owner

lwouis commented Jan 12, 2025

Could you both confirm that the issue happens with the latest v7.18.0 version, as well?
Thank you

@darthlite
Copy link
Author

Hi,

I'm not able to reproduce this issue.

Could you please show the same situation as in the video, and this time right-click on Word in the Dock? Then left-click it?

Also, AltTab was opened before Word, correct?

Thank you

I changed from Word to VSCodium just because Word had private info when app was open, but behavior is the same. And yes, AltTab was opened before VSCodium as seen in the video.

AltTab2.mp4

Could you both confirm that the issue happens with the latest v7.18.0 version, as well? Thank you

I have updated to v7.18.0 before recording the video. Behavior is the same. I saw a windowless app (Word, actually) when I went to the switcher immediately after updating AltTab, but when I quit Word and launched it again, then exited all windows, it didn't appear in the switcher.

@surajk16
Copy link

I updated to 7.19.0 and it resolved one issue that I was facing - which is not focus/open a window that was actually open.
But I still face the issue wherein there is actually no open window in Mac, but I still see a dot on the taskbar which means it wasn't fully quit. Previously I would see that as well in alt tab which would give me an option to quit the window entirely hence removing the dot from the taskbar as well.

@lwouis
Copy link
Owner

lwouis commented Jan 14, 2025

Could you please run AltTab through the Terminal with this command /Applications/AltTab.app/Contents/MacOS/AltTab --logs=debug, and share the logs here? I'm interested especially with what's written after the last window of the app is closed.

Thank you

@darthlite
Copy link
Author

Hopefully I got this right, but this is what I see outputted after closing the last window of the app:

08:19:05 DEBG SystemPermissions.swift:73 checkPermissionsWhileAltTabIsRunning() granted granted true granted false false
08:19:05 DEBG SystemPermissions.swift:75 checkPermissionsWhileAltTabIsRunning() granted
08:19:05 DEBG SystemPermissions.swift:82 checkPermissionsWhileAltTabIsRunning() granted
08:19:05 DEBG RunningApplicationsEvents.swift:17 handleEvent() [(59475, "com.apple.WebKit.GPU")]
08:19:09 DEBG AccessibilityEvents.swift:7 AltTab() AXApplicationActivated
08:19:09 INFO AccessibilityEvents.swift:15 handleEvent() AXApplicationActivated 59159 VSCodium
08:19:09 DEBG KeyboardEventsTestable.swift:16 handleKeyboardEvent() nil nil nil NSEventModifierFlags(rawValue: 1048840) false NSEventModifierFlags(rawValue: 0)
08:19:09 DEBG KeyboardEventsTestable.swift:16 handleKeyboardEvent() nil nil nil NSEventModifierFlags(rawValue: 256) false NSEventModifierFlags(rawValue: 1048576)
08:19:10 DEBG SystemPermissions.swift:73 checkPermissionsWhileAltTabIsRunning() granted granted true granted false false
08:19:10 DEBG SystemPermissions.swift:75 checkPermissionsWhileAltTabIsRunning() granted
08:19:10 DEBG SystemPermissions.swift:82 checkPermissionsWhileAltTabIsRunning() granted
08:19:10 DEBG KeyboardEventsTestable.swift:16 handleKeyboardEvent() nil nil nil NSEventModifierFlags(rawValue: 1048840) false NSEventModifierFlags(rawValue: 0)
08:19:10 DEBG KeyboardEventsTestable.swift:16 handleKeyboardEvent() 0 down nil nil false NSEventModifierFlags(rawValue: 1048576)
08:19:10 INFO ATShortcut.swift:73 executeAction() executeAction nextWindowShortcut
08:19:10 DEBG App.swift:229 showUiOrCycleSelection() 0 0 true
08:19:10 DEBG AccessibilityEvents.swift:7 AltTab() AXFocusedWindowChanged
08:19:10 DEBG AccessibilityEvents.swift:7 AltTab() AXFocusedWindowChanged
08:19:10 DEBG AccessibilityEvents.swift:7 AltTab() AXWindowCreated
08:19:10 DEBG AccessibilityEvents.swift:7 AltTab() AXWindowCreated
08:19:10 DEBG KeyboardEventsTestable.swift:16 handleKeyboardEvent() nil nil nil NSEventModifierFlags(rawValue: 256) false NSEventModifierFlags(rawValue: 0)
08:19:10 INFO ATShortcut.swift:73 executeAction() executeAction holdShortcut
08:19:10 INFO App.swift:123 focusTarget() 45950 p10k Modified Colors (AltTab) 764 com.googlecode.iterm2
08:19:10 INFO App.swift:71 hideUi() true
08:19:10 INFO AccessibilityEvents.swift:15 handleEvent() AXFocusedWindowChanged 57757
08:19:10 DEBG KeyRepeatTimer.swift:28 deactivateTimerForRepeatingKey() nextWindowShortcut
08:19:10 DEBG KeyboardEventsTestable.swift:16 handleKeyboardEvent() 0 up nil nil false NSEventModifierFlags(rawValue: 0)
08:19:10 INFO AccessibilityEvents.swift:15 handleEvent() AXWindowCreated 57757 nil
08:19:10 DEBG AccessibilityEvents.swift:7 AltTab() AXApplicationActivated
08:19:10 INFO AccessibilityEvents.swift:15 handleEvent() AXApplicationActivated 764 iTerm2
08:19:10 DEBG KeyboardEventsTestable.swift:16 handleKeyboardEvent() nil nil nil NSEventModifierFlags(rawValue: 1048840) false NSEventModifierFlags(rawValue: 0)
08:19:10 DEBG KeyboardEventsTestable.swift:16 handleKeyboardEvent() nil nil nil NSEventModifierFlags(rawValue: 256) false NSEventModifierFlags(rawValue: 1048576)

@surajk16
Copy link

surajk16 commented Jan 15, 2025

10:17:10 DEBG Window.swift:54 init() Adding window 2012 mac hide taskbar - Google Search - Google Chrome com.google.Chrome
10:17:10 DEBG Window.swift:54 init() Adding window 1965 facebook.csod.com/lms/scorm/clientLMS/LMS3.aspx?rNum=1&aicc_sid=23575690facebook&packageId=B0&qs=%5e%5e%5eZ8IleCPViMgEMnExZMFculS9AvLAbwnzFS2cgqam%2b%2bWLYF7hv%2fR1pqtuza5FG3uZfMn427XfE%2b5d59Um6akuuHs%2bUHLpJx5lQV0AgtSe%2bopSpFTcEZoRiETwc5j7QXYvRm6YcWBa8T3iJ57r%2facUy17gwcAYNasxg4T8EvwjiohPmL87twONIDFvKyGWglC%2fmNirBys1M8%2fFV250UXsz9GAEW%2bv66GiK8eo8R2UULZM%3d - Google Chrome com.google.Chrome
10:17:10 DEBG Window.swift:54 init() Adding window 589 Workplace Chat workplace-desktop
10:17:10 DEBG Window.swift:54 init() Adding window 1978 Windowless Apps Not Showing in Switcher · Issue #4108 · lwouis/alt-tab-macos - Google Chrome com.google.Chrome
10:17:10 DEBG Window.swift:54 init() Adding window 2349 Windowless Apps Not Showing in Switcher · Issue #4108 · lwouis/alt-tab-macos - Google Chrome com.google.Chrome
10:17:10 DEBG Window.swift:54 init() Adding window 2404 sudharsan — AltTab --logs=debug — 80×24 com.apple.Terminal
10:17:10 DEBG Window.swift:54 init() Adding window 2418 Notes com.apple.Notes
10:17:13 DEBG KeyboardEventsTestable.swift:16 handleKeyboardEvent() nil nil nil NSEventModifierFlags(rawValue: 1048840) false NSEventModifierFlags(rawValue: 0)
10:17:13 DEBG KeyboardEventsTestable.swift:16 handleKeyboardEvent() 0 down nil nil false NSEventModifierFlags(rawValue: 1048576)
10:17:13 INFO ATShortcut.swift:73 executeAction() executeAction nextWindowShortcut
10:17:13 DEBG App.swift:229 showUiOrCycleSelection() 0 0 true
10:17:13 DEBG AccessibilityEvents.swift:7 AltTab() AXFocusedWindowChanged
10:17:13 DEBG AccessibilityEvents.swift:7 AltTab() AXFocusedWindowChanged
10:17:13 DEBG AccessibilityEvents.swift:7 AltTab() AXWindowCreated
10:17:13 DEBG AccessibilityEvents.swift:7 AltTab() AXWindowCreated
10:17:13 INFO AccessibilityEvents.swift:15 handleEvent() AXFocusedWindowChanged 56777
10:17:13 INFO AccessibilityEvents.swift:15 handleEvent() AXWindowCreated 56777
10:17:13 DEBG AccessibilityEvents.swift:7 AltTab() AXFocusedWindowChanged
10:17:13 INFO AccessibilityEvents.swift:15 handleEvent() AXFocusedWindowChanged 56777
10:17:13 DEBG AccessibilityEvents.swift:7 AltTab() AXFocusedWindowChanged
10:17:13 DEBG KeyboardEventsTestable.swift:16 handleKeyboardEvent() 0 up nil nil false NSEventModifierFlags(rawValue: 1048576)
10:17:13 DEBG KeyRepeatTimer.swift:28 deactivateTimerForRepeatingKey() nextWindowShortcut
10:17:14 DEBG KeyboardEventsTestable.swift:16 handleKeyboardEvent() nil nil nil NSEventModifierFlags(rawValue: 256) false NSEventModifierFlags(rawValue: 0)
10:17:14 INFO ATShortcut.swift:73 executeAction() executeAction holdShortcut
10:17:14 INFO App.swift:123 focusTarget() 2418 Notes 78395 com.apple.Notes
10:17:14 INFO App.swift:71 hideUi() true
10:17:14 DEBG AccessibilityEvents.swift:7 AltTab() AXApplicationActivated
10:17:14 INFO AccessibilityEvents.swift:15 handleEvent() AXApplicationActivated 78395 Notes
10:17:15 DEBG KeyboardEventsTestable.swift:16 handleKeyboardEvent() nil nil nil NSEventModifierFlags(rawValue: 1048840) false NSEventModifierFlags(rawValue: 0)
10:17:15 DEBG KeyboardEventsTestable.swift:16 handleKeyboardEvent() 0 down nil nil false NSEventModifierFlags(rawValue: 1048576)
10:17:15 INFO ATShortcut.swift:73 executeAction() executeAction nextWindowShortcut
10:17:15 DEBG App.swift:229 showUiOrCycleSelection() 0 0 true
10:17:15 DEBG SystemPermissions.swift:73 checkPermissionsWhileAltTabIsRunning() granted granted true granted false false
10:17:15 DEBG SystemPermissions.swift:75 checkPermissionsWhileAltTabIsRunning() granted
10:17:15 DEBG SystemPermissions.swift:82 checkPermissionsWhileAltTabIsRunning() granted
10:17:15 DEBG AccessibilityEvents.swift:7 AltTab() AXFocusedWindowChanged
10:17:15 DEBG AccessibilityEvents.swift:7 AltTab() AXFocusedWindowChanged
10:17:15 DEBG AccessibilityEvents.swift:7 AltTab() AXWindowCreated
10:17:15 DEBG AccessibilityEvents.swift:7 AltTab() AXWindowCreated
10:17:15 INFO AccessibilityEvents.swift:15 handleEvent() AXFocusedWindowChanged 56777
10:17:15 INFO AccessibilityEvents.swift:15 handleEvent() AXWindowCreated 56777
10:17:15 DEBG AccessibilityEvents.swift:7 AltTab() AXApplicationActivated
10:17:15 INFO AccessibilityEvents.swift:15 handleEvent() AXApplicationActivated 78258 Terminal
10:17:15 DEBG KeyboardEventsTestable.swift:16 handleKeyboardEvent() 0 up nil nil false NSEventModifierFlags(rawValue: 0)
10:17:15 DEBG KeyRepeatTimer.swift:28 deactivateTimerForRepeatingKey() nextWindowShortcut
10:17:15 INFO App.swift:123 focusTarget() 2404 sudharsan — AltTab --logs=debug — 80×24 78258 com.apple.Terminal
10:17:15 INFO App.swift:71 hideUi() true
10:17:15 DEBG KeyboardEventsTestable.swift:16 handleKeyboardEvent() nil nil nil NSEventModifierFlags(rawValue: 256) false NSEventModifierFlags(rawValue: 0)
2025-01-15 10:17:16.195 AltTab[78847:1638269] +[IMKClient subclass]: chose IMKClient_Modern
2025-01-15 10:17:16.195 AltTab[78847:1638269] +[IMKInputSession subclass]: chose IMKInputSession_Modern
10:17:17 DEBG AccessibilityEvents.swift:7 AltTab() AXApplicationActivated
10:17:17 INFO AccessibilityEvents.swift:15 handleEvent() AXApplicationActivated 78395 Notes
10:17:20 DEBG AccessibilityEvents.swift:7 AltTab() AXApplicationActivated
10:17:20 INFO AccessibilityEvents.swift:15 handleEvent() AXApplicationActivated 78258 Terminal
10:17:20 DEBG SystemPermissions.swift:73 checkPermissionsWhileAltTabIsRunning() granted granted true granted false false
10:17:20 DEBG SystemPermissions.swift:75 checkPermissionsWhileAltTabIsRunning() granted
10:17:20 DEBG SystemPermissions.swift:82 checkPermissionsWhileAltTabIsRunning() granted
10:17:21 DEBG KeyboardEventsTestable.swift:16 handleKeyboardEvent() nil nil nil NSEventModifierFlags(rawValue: 262401) false NSEventModifierFlags(rawValue: 0)
^C

In this I closed the Notes window, it disappears from AltTab but shows up in the dock as though it is open (with a dot indicator).

@lwouis
Copy link
Owner

lwouis commented Jan 15, 2025

I think this issue has the same root cause as #3589. That is, the OS is not sending us the event about the window being destroyed.

The difference with #3589 is that the window is no longer shown in the switcher here, whereas it remains shown in the other ticket.

I haven't implemented the workaround for #3589. Few users have complained, so I assumed that macOS had pushed a fix for this. They may have actually. I see that OP is on macOS 15.1.1 which is not the latest. Perhaps everyone who reported here is not on the latest.

Could you please try updating your macOS to the latest? The root cause of this issue is a bug in macOS, not reporting windows being closed.

Another thing that people in #3589 have found success with is to quit specific app that contribute to trigger the OS bug. Please see if you run those, and try to not run them to see if the bug goes away.

If it still happens, it means that the issue is not solved for everyone. Depending on the number of people reporting the issue in this ticket and the other ticket, I may need to implement the workaround from yabai.

Thank you

@surajk16
Copy link

image

I'm running 15.2 and it says I'm on the latest version though.

@darthlite
Copy link
Author

I have just upgraded to 15.2, and the issue did not go away unfortunately.

Is it normal that the issue would only occur for some users given it's a macOS bug?

@lwouis
Copy link
Owner

lwouis commented Jan 16, 2025

@darthlite yes, Apple seem to do A/B testing. See #3973 for instance. It could also be happening only under some circumstances (e.g. using some apps like people have reported above).

@ADTC
Copy link

ADTC commented Jan 17, 2025

Interesting. Works fine for me, and it justifies me sticking to Sonoma 14 for now. LOL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unreproducible Need help from the author to reproduce the issue
Projects
None yet
Development

No branches or pull requests

4 participants