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

AltTab intercepts some shortcuts like command+Q even though it has no open window #3577

Open
ShaiAvr opened this issue Aug 30, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@ShaiAvr
Copy link

ShaiAvr commented Aug 30, 2024

Describe the bug

I recently installed alt-tab on my MacBook and I really like it. However, I encountered a weird bug by accident. I was playing with alt-tab's settings and then closed the settings window. The entire time, the menubar shows that I have another app focused which is odd, and when I close the settings window, I get back to the app I was in before. However, if I press Cmd+Q to try and quit that app, nothing happens until I realize I actually quit alt-tab. This is an extremely weird and unintuitive behavior. Clearly, the alt-tab settings panel is not a normal app, but just a panel, similar to the finder settings panel. When I close this settings panel, it appears I went back to the previous app I was in, but the truth is that alt-tab is still focused so hitting Cmd+Q quits it unexpectedly. The following recording should demonstrate the problem

Screenshots / video

recording.mov

Steps to reproduce the bug

This video shows how closing alt-tab settings panel still keeps it focused which could lead to accidentally quitting it.

  1. I have a different app focused like VSCode in the video.
  2. I open alt-tab's settings from the menubar to play with it. Note that the menubar still says that VSCode is focused, but we clearly work on alt-tab's settings panel and VSCode isn't focused. It looks like this panel is not a normal app, but rather a small panel, which is fair, but it makes the previous app remain in the menubar.
  3. I close alt-tab's settings using the red x button, or with Cmd+W. At this stage, I believe that I closed alt-tab and I am back to VSCode. I clearly see VSCode in the menubar, but we can also see that the VSCode window isn't actually focused. In fact, alt-tab is still focused, but we have no way of knowing that! Even cycling the open apps with the default Cmd+Tab or alt-tab doesn't show the alt-tab app, so it looks like it's closed, but it is in fact still open and focused!
  4. I hit Cmd+Q thinking that I am quitting VSCode, but I actually just quit alt-tab instead. This is very frustrating, since as I said before, after closing alt-tab's settings panel, I don't have any way to know that it's still open and focused.

Your environment

  • AltTab version: 6.72.0
  • macOS version: macOS Sonoma 14.6.1
  • Other relevant info: None
@ShaiAvr ShaiAvr added the bug Something isn't working label Aug 30, 2024
@lwouis
Copy link
Owner

lwouis commented Aug 30, 2024

Hi,

This behavior is indeed surprising. I'll share some context:

When AltTab shows its main window, it's very careful not to change existing focus. If you're typing text in an app (keyboard focus), you'll notice that the cursor is still blinking, that the window still has the colored circles in the top-left corner, and that this app's name and menu items are still shown in the top menubar.

This is because bringing the switcher shouldn't mess with the user's existing state of windows and focus.

However, we still need to react to some shortcut. For instance, if you press command+,, while AltTab switcher is showing, it will bring up the Preferences window. This is happening because there is an invisible menubar for AltTab. It's also necessary so that the user can copy-paste in the text input of AltTab preferences window or feedback window.

I'll see if there is a way to only have this magic menubar only active when there are AltTab windows showing. It shouldn't be there where there are no window at all, indeed.

Thank you 🙇

@lwouis lwouis changed the title Pressing Cmd+Q after closing alt-tab settings quits it despite it not being an open or active app AltTab intercepts some shortcuts like command+Q even though it has no open window Aug 30, 2024
@lwouis
Copy link
Owner

lwouis commented Aug 30, 2024

I've found a fix. It will be shipped in the next release 👍

lwouis added a commit to Allsochen/alt-tab-macos that referenced this issue Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants