lwouis / alt-tab-macos

Windows alt-tab on macOS
https://alt-tab-macos.netlify.app
GNU General Public License v3.0
10.91k stars 327 forks source link

Newly Opened Windows Lose Focus *(and can't be focused again)* When Quickly Switching with Alt-Tab #3747

Open DontEatOreo opened 2 weeks ago

DontEatOreo commented 2 weeks ago

Describe the bug

When switching between the current and a newly opened window too quickly using Alt-Tab, the new window appears in the Alt-Tab switcher but does not gain focus. Instead, it remains in the background, and only the menu bar indicates the switch.

The only way right now to fix this is to: A) Completely quit the app B) Restart Alt-Tab

Screenshots / video

No Delay (Bug Happening):

https://github.com/user-attachments/assets/cd9cd89d-addb-4e19-a1e3-6dec1d0b5da3

Delayed (Bug NOT happening):

https://github.com/user-attachments/assets/d0628702-f827-440a-b1b2-266c6cd6af73

Steps to reproduce the bug

  1. Open a new window
  2. Immediately start using Alt-Tab to switch between the current and new window
  3. Notice that while you can Alt-Tab to the old window properly, alt-tabbing or selecting the new window does not bring it to the front, despite appearing in the Alt-Tab menu

Your environment

lwouis commented 1 week ago

Hi,

I tried to reproduce with IINA like in your video. I can't reproduce it.

Does it happen with any other app than IINA? I wonder if this resizing animation is the source of the issue. We've had very specific issues with IINA in the past.

Thank you 🙇

DontEatOreo commented 1 week ago

It happens with Telegram too, though I'm not sure how to replicate it exactly. But again, switching too fast on newly opened windows seems to be one of the main factors in this.

I tried to reproduce with IINA like in your video. I can't reproduce it.

Did you try to replicate it via the GUI? I think you would have more success replicating it if you opened it via the terminal and started instantly alt-tabbing

lwouis commented 1 week ago

I tried the same way you did, with the Terminal and open.

Telegram is another app which has issues. There are around 50 tickets here mentionning it.

Any other app than these 2 apps, showcasing the issue?

DontEatOreo commented 1 week ago

Shottr, I can NEVER Alt-Tab to it, the macOS Alt-Tab works fine with it though

lwouis commented 1 week ago

I couldn't reproduce the issue with Shottr:

https://github.com/user-attachments/assets/7c4bd7a0-e216-46bf-880b-645c7a1faf55

Could you please share a video?

DontEatOreo commented 1 week ago

I should've specified but the window of the screenshot is broken...

https://github.com/user-attachments/assets/64d0402f-02da-428d-b729-aacbace77e87

The other windows in Shottr can be alt-tabbed

lwouis commented 1 week ago

I can't reproduce on my machine:

https://github.com/user-attachments/assets/4672eeb4-7530-44f5-a285-23a13a7118e7

I wonder what's different on your setup. It's the same major macOS version, AltTab version.

DontEatOreo commented 1 week ago

Okay, I notice that Lasso makes the issue much worse. I was able to "break" alt-tabbing between IINA with Lasso closed, but it was much harder.

I can alt-tab normally between Shottr and other tabs with Lasso closed