lwouis / alt-tab-macos

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

The Android Studio emulator toolbar appears in Alt-Tab #3496

Open ShlomoCode opened 1 month ago

ShlomoCode commented 1 month ago

Describe the bug

Android Studio emulators have a sort of vertical toolbar attached: CleanShot 2024-07-18 at 06 35 19@2x

Alt Tab displays the toolbar as a separate windows (I think the toolbar should not appear at all): CleanShot 2024-07-18 at 06 36 18@2x

This is NOT a regression by https://github.com/lwouis/alt-tab-macos/commit/2e15732, I checked with v6.71.0 and the toolbar appears.

If there is any additional information you need, please let me know!

lwouis commented 1 month ago

Hi,

We already have hard-coded a workaround for this. I'm surprised it stopped working. Android Studio must have been updated recently.

This issue is not on AltTab side. This vertical bar is a window. That's why AltTab can report it.

I think it would be useful to report this issue to Android Studio support. AltTab was working around the issue, but the root cause remains. Also, maybe the Android Studio team wants this bar to be a separate window?

Thank you

ShlomoCode commented 1 month ago

What is the sidebar element expected to be? I need a little more details to contact them.

lwouis commented 1 month ago

AltTab displays Standard Windows and Dialogs. If an app use that to make a UI element, it will show in AltTab. If they use another element like a HUD or custom UI, then AltTab will not display it.

There are many "popups", "popovers", little pieces of UI that exist on your OS which don't show in AltTab. This is because they were implemented using relevant APIs, and they are not standard windows.

Thank you

ShlomoCode commented 1 month ago

Yes I checked and the subrole is AXDialog (kAXDialogSubrole), so it doesn't reach the line

androidEmulator(runningApp, title)

at all. it returns true in

[kAXStandardWindowSubrole, kAXDialogSubrole].contains(subrole) ||

In the past sidebar was not AXDialog?

lwouis commented 1 month ago

In the past sidebar was not AXDialog?

I guess so. They may have updated it, which broke our workaround.

Again, the real issue is not with AltTab, but the fact that they consider this UI element a Dialog. AltTab should show dialogs as it's the kind of stuff the user wants to tab to and from.

ShlomoCode commented 1 month ago

Do you know how Mission Control knows to show them as one window?

CleanShot 2024-07-18 at 16 23 28@2x

CleanShot X also captures them together.

lwouis commented 1 month ago

I think they may be using child/parent NSWindow APIs?

ShlomoCode commented 1 month ago

The point is that maybe this is the right behavior on their part, and the problem is with AltTab not behaving like Mission Control and the like?

lwouis commented 1 month ago

This pattern of windows glued together is very uncommon. Photoshop works with lots of panels like this, but people tend to move them around their multiple monitor, so AltTab should probably show them independently and not as a giant imagine scattered panels.

Can you move the side-panel around in the case of Android Emulator? If yes, then same issue as with Photoshop. If no, then it's a very unique UI pattern.

Another similar case we have with linked-windows is "Save As" or "Open" file pickers. Currently, we don't show them as independant windows, nor do we show them on the thumbnail of their parent window. It's a very tricky situation since these are Sheets, and there are many types with different behavior.

Android Emulator is an outlier. That is, no one is complaining about other windows in that configuration, being an issue with AltTab. I'm not sure how to go forwards here.

I'll also add that this app is poorly wraped in general. It doesn't have an Icon or a BundleID for instance. This is why I suggest sharing feedback with them. This thing surely could get better integrated into macOS.

ShlomoCode commented 1 month ago

https://issuetracker.google.com/issues/353915729