-
-
Notifications
You must be signed in to change notification settings - Fork 348
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
Finder tabs show as separate windows #383
Comments
I can't reproduce this issue locally, so I contacted the author and asked for them to film/screenshot the situation on their machine, to help me understand it better. |
The author shared more information, and I was able to reproduce. The issue happens:
While reproducing, I actually noticed another issue. It happens when opening tabs really fast like spamming |
I'm not sure if this is related (I can't read the original message), but when I have multiple terminal tabs and I have visited two different terminal tabs recently, those tabs show up in AltTab, even though "Show standard tabs as windows" is unchecked. I would like only the windows to show in the switcher, not the tabs, which I believe is the intended behaviour of that option. Reproduce by:
|
@thomassross I can't reproduce the issue by following your steps. However, I can reproduce a similar end situation by quickly opening 2 tabs in the terminal (with 2 quick Not sure what can be done to improve that situation. Tabs are one of the messiest part of AltTab, due to the complete lack of API from macOS. We basically listen to unrelated events, and observe side-effects of windows being tabbed, to determine if a window is a tab or not. These work arounds are brittle. Over at yabai for instance, tabs are simply officially not supported as there is no known robust way to handle them. |
@lwouis I assume you rely on the fact that the window creates an AXTabGroup? I had the following observation when I dug into this previously:
|
Actually that's not the trick I use. I listen to |
It's strange that you can't reproduce it. The tabs show in my AltTab switcher far more often than they don't, and I'm not sure that it's related to opening tabs quickly. I'm not too familiar with the macOS APIs, are you saying the list of windows you get includes tabs? As in you try to fetch a list of windows you can switch through and that list includes the tabs of my terminal windows, but they are listed as separate "windows"? |
AltTab uses the Accessibility API to query the state of the OS: apps running, their windows, events on these windows, etc. When asking an app for its windows, you get an array of windows. This array doesn't list tabs. It lists only: independent windows, and focused tab in a tabbed-windows. Let's say you have 1 terminal window with 3 tabs. The array will only contain the focused tab, like the app had only 1 window. The trick we use in AltTab is that we keep track of windows when they are created, so when you create the 3 tabs, AltTab is aware of all 3. Then when tab/untab them later on, we ask the app again for its window list, and we flag all missing windows as being tabbed, and all windows remaining in the list as being un-tabbed. Here this code fails somehow, maybe because when it's too fast, some events get missed, or something. I need to investigate more on why this is happening. |
Maybe I'm missing something, but when "Show standard tabs as windows" is unchecked, can't the tab tracking code just be disabled and AltTab will just switch to the focused tab (i.e. the only window that the app tells AltTab about)? |
I think you're imagining that AltTab asks the app for windows when summoned through the shortcut. When the user presses the shortcut, we really made a huge effort to have AltTab pop as fast as possible so it feels snappy. It turns out that the Accessibility API is slow because you have to wait for the OS to answer. Thus we avoid doing check on summon. We observe the OS as events happen (like the user tabbing/untabbing windows), and note the state these windows are in. Then when summoned, we display the windows we were tracking. Here is an example scenario:
I hope it makes it a bit more clear why it's not that simple. We don't ask the app for its window at summon-time. That would be expensive, for all the apps, for all the windows. Instead we establish what's tabbed/untabbed continuously. |
That makes sense. Thanks for the explanation. |
I think I have fixed tab detection. With the fix, it seems to handle correctly these scenarios:
I have tested all these scenarios with the preference "Show standard tabs as separate windows" turned on and off. Everything looks good to me. This ticket will be closed automatically once the fix is merged and a new version is released. Please let me know if you still see tabs issues! (@thomassross) |
Unfortunately, I think that this change has actually broken #335 again - neither Remote Desktop nor Citrix windows are showing for me if they start fullscreen, now that I'm running 4.1.6. |
I did mean that, yes; I've edited my previous comment. It seems to be behaving much as it did before you fixed #335, TBH. If it starts fullscreen then there is no sign of the Remote Desktop session window in AT. If I take it out of FS and back in, now it shows up. Unfortunately, I would be unable to capture video (or probably upload it anywhere even if I did). |
The good news is that so far (from my somewhat limited testing), tabs are working correctly! I'll write another comment here if it starts being broken again. |
Bad news: I'm still seeing the issue. Seems to just appear after running Terminal.app with a few tabs open and switching between tabs/apps for a few hours. I don't really have very strong reproduction instructions unfortunately. |
@thomassross is your terminal fullscreen? How many tabs do you have? How did you create the tabs? Did you split them into windows then back into tabs? I just tried a lot again, and no matter the trickiness of my scenarios, it's always working great |
My terminal is not fullscreen. I usually have around 5-10 tabs. I create them using Command-T, just whenever I need them, and I open and close different ones (with Command-W) fairly often. I do not split into windows and back. I'll also try to come up with a way to consistently reproduce and report back here. |
Actually, as soon as you have a clearer picture on which scenario is not working, please open a new ticket. It will make the scope of the issue clearer as this current one was about fullscreen windows with tabs |
I have the same problem with Terminal (zsh). Has anyone opened a new issue? Maybe #2017 is related, but is not the same bug reported here. |
This issue was opened by a bot after a user submitted feedback through the in-app form.
From: [email protected]
Message:
Debug profile
The text was updated successfully, but these errors were encountered: