lwouis / alt-tab-macos

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

Facebook Messenger doesn't play nicely with AltTab #3692

Open szhu opened 3 days ago

szhu commented 3 days ago

Describe the bug

The official Facebook Messenger app has some issues with AltTab. AltTab is great with all other apps I use, so the root cause of these issues is likely with Messenger itself.

I wanted to report the bugs anyway:

  1. To double-check that these bugs are indeed experienced by other people,
  2. To see if anyone has come up with any workarounds, and/or
  3. To see if there are any low-effort changes to AltTab that can be made to mitigate the issues.

There are two bugs described below. Let me know if it would be helpful to split them into two separate issues.

Bug 1: AltTab sometimes doesn't foreground the main Messenger window

After the Messenger main window has been closed once, focusing it with AltTab doesn't bring it to the foreground.

Screenshots / video

https://github.com/user-attachments/assets/84f0f11b-4185-4f28-aa63-e4eab94616f2

Steps to reproduce the bug

  1. Launch AltTab with default settings.
  2. Launch Messenger.
    • Result: The Messenger main window appears.
  3. Click the red 'X'.
    • Result: The Messenger main window disappears, and is no longer in the AltTab list.
  4. Click Messenger in the Dock.
    • Result: The Messenger main window appears again.
  5. Click another window.
    • Result: The other window becomes focused and in the foreground.
  6. Press the AltTab shortcut and hold down the modifier key.
    • Result: The Messenger window is selected.
  7. Let go of the modifier key.
    • Expected result: The Messenger main window becomes focused and in the foreground.
    • Actual result: The Messenger app becomes focused but not in the foreground.

Bug 2: Sometimes blank "Media Viewer" windows appear in the AltTab list

After the Messenger Media Viewer window has been closed, it still appears in the AltTab list when the Messenger app is hidden. Each time a photo is opened, it creates another such phantom window.

Screenshots / video

https://github.com/user-attachments/assets/d506bdf0-6e10-4c41-8661-63a300d14a61

Steps to reproduce the bug

  1. Launch AltTab with default settings.
  2. Launch Messenger.
    • The Messenger main window appears.
  3. Find a photo in any chat and click on it.
    • Result: The photo opens in a window titled "Media Viewer".
  4. Click the red 'X'.
    • Result: The Media Viewer window disappears, and is no longer in the AltTab list.
  5. Press Cmd-H.
    • Result: The Messenger main window disappears, and another app becomes focused.
  6. Press the AltTab shortcut and hold the modifier key.
    • Expected result: There should be one Messenger window in the list: the main window.
    • Actual result: The main window is in the list, but so is a blank Media Viewer window. The number of Media Viewer windows there are corresponds to how many times a photo was opened in step 4.
  7. Focus any Messenger window. Press the AltTab shortcut and hold the modifier key.
    • Result: The Media viewer windows are no longer in the AltTab list.

Your environment

lwouis commented 2 days ago

Hi,

Thank you for sharing these issues.

I couldn't reproduce the first issue. It works well in my tests. I wonder if the issue is not with Arc. Does the same thing happen for you if the window on top is TextEdit for instance?

I couldn't reproduce the second issue either. I don't get these phantom windows. Are you on the latest version Messenger? I tested with v220.1.0.5.212.

Thank you 🙇

szhu commented 2 days ago

Thanks for trying to reproduce it. The issue does not seem related to Arc; I tried with Finder and TextEdit instead of Arc (and with Arc not running) and ran into the same issue.

I tried with a new user account and it became impossible to reproduce either bug on a fresh setup. I downloaded some of the apps I normally use, and was eventually able to reproduce the bug again, but not reliably.

This bug appears to be a trickier to narrow down than I had previously thought! I'll spend some more time narrowing a reliably reproducible test case and will report back.

eskayn commented 1 day ago

I am in quite a different situation but having a similar window not foreground issue on 15.0.1(24A348)with both AltTab 7.0.2 and 6.73.0.

When I use a software called XLD to open a disc, it will first read the disc by showing a progress bar window. After it is finished the progress bar window disappears and there will be a new XLD window pops up onto the foreground(this is how XLD works). After that AltTab can not foreground the popped-up XLD window even choose it in AltTab. I tried a few times but I also found the bug seems to be tricky when I restart or use a new user the issue is gone but it returns after several trials.

SarcevicAntonio commented 23 hours ago

I also have the not appearing in foreground issue on some apps, namely Slack and Telegram. A restart of either AltTab or Slack fixes it for a bit, but after a while the issue reappears. Maybe thats why reproducing it is a bit tricky.