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

Some windows don't show in AltTab #1317

Closed
Joilence opened this issue Jan 9, 2022 · 19 comments
Closed

Some windows don't show in AltTab #1317

Joilence opened this issue Jan 9, 2022 · 19 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists need breakthrough Need a breakthrough idea to move forwards

Comments

@Joilence
Copy link

Joilence commented Jan 9, 2022

Describe the bug

Not able to show all windows, only works as show windows of one app.

macOS 12.1, MBA M1 2020, AltTab Version 6.29.0.

Screenshots / video

Using Default settings:

CleanShot 2022-01-09 at 18 48 34@2x

With Dash in the front, two Safari windows and AltTab in the back, only shows Dash:

CleanShot 2022-01-09 at 19 04 26-0001

With two Safari windows in the front, Dash and AltTab in the back, show two Safari windows:

CleanShot 2022-01-09 at 19 04 26-0002

Steps to reproduce the bug

With the same environment, install app, run, and try the default shortcut.

@Joilence Joilence added the bug Something isn't working label Jan 9, 2022
@flypenguin
Copy link

flypenguin commented Jan 17, 2022

i constantly do not see opened apps. if i activate mission control the windows are visible, but no icon in alttab. restarting alttab helps. this is a blocker bug in my eyes - it's the core of what alttab does, and it is highly annoying.

MacOS 12.1 (21C52)
AltTab 6.29.0

@lwouis
Copy link
Owner

lwouis commented Jan 17, 2022

@flypenguin there is no public API for this core functionality. AltTab uses private APIs and SPIs, and very complex tricks to do the best it can. To my knowledge, AltTab is best in class. Yet it's not 100% reliable.

if you have concrete knowledge on how to improve, please share it.

I've been doing my best efforts for years on this app but at the end of the day i'm fighting the operating system and its internal quirks and bugs.

@Joilence
Copy link
Author

I do appreciate your efforts and I understand the project is in the transition of looking for a new maintainer.

Only FYI, on my machine, HyperSwitch works well (only the developer stop maintaining it so it constantly pops out the beta expired window).

So there should be some way could fix it. I just wonder if my problem appears also on other people's machines.

@flypenguin
Copy link

flypenguin commented Jan 17, 2022

@Joilence true, i checked with witch and contexts - they both seem to suffer the exact same fate. i really love apple, except for that part. that part sucks. alttab has become a core tool of mine, and it seems apple just canceled the whole class. i went back to standard mac os task switcher for now. i see all apps, but i can't switch windows. drives me just as crazy in a different way.

@lwouis
Copy link
Owner

lwouis commented Jan 18, 2022

@Joilence i've contacted HyperSwitch developer multiple times. I tried to find his work contact using his company registration for example. Detective work lol. I did it because i thought i could convince him to open source the app, or maybe sell me the code which i would have open sourced. He's unreachable. I also decompiled and tried to retro engineer his app to find his techniques as well as maybe private APIs he's using and i'm not. I confirmed some suspicions that way.

Overall if something seems to work better on HyperSwitch it's probably a tradeoff. The way HS updates the thumbnails for instance is poor compared to AltTab. They also have some use-cases where focusing windows fail whereas it works on AltTab. Their keyboard shortcuts won't work in Secure Input mode when AltTab does. Etc

If you want to help, i invite you to try to contact the HS author, or disassemble the app to try and get insight as i did. That would be helpful

@Joilence
Copy link
Author

@lwouis I tried to contact the developer of HyperSwitch as well. Yes, unreachable at least for quite some time indeed.

TBH this is beyond my ability, I may not be able to help in a technical way.

@ikodev
Copy link

ikodev commented Jan 20, 2022

Same problem for me :-)

@PsyGik
Copy link

PsyGik commented Jan 25, 2022

One behavior that I've observed (in Contexts as well), is that during/after entering sensitive info, like passwords, credit card etc. the the windows (in my instance Firefox), doesn't show up until I restart either Firefox or AltTab. Really frustrating experience, wish Apple provided a public API instead of good people having to hack through private undocumented APIs

@d1rewolf
Copy link

d1rewolf commented Feb 2, 2022

I'm having issues as well...mostly it seems that certain applications (Firefox is most noticeable) stop showing up. A restart of the app fixes it.

@lwouis, just wanted to say thank you for all your hard work on alt-tab. It has to be a completely frustrating experience to try to reverse engineer this crap. For as much as Apple likes to be known as a developer-focused platform, they seem overtly developer-hostile. If they didn't make such wonderful hardware, I'd switch back to linux in a heartbeat ;-)

@lwouis lwouis added the need breakthrough Need a breakthrough idea to move forwards label Apr 21, 2022
This was referenced Apr 21, 2022
@lwouis lwouis changed the title Not able to show all windows Some windows don't show in AltTab Apr 29, 2022
This was referenced May 10, 2022
@codewise-nicolas
Copy link

The app is the best thing Ive found in a long time.

What about a "Restart App" in the tray icon options list. I know its annoying to have to restart the app to have it re-find the windows, but at least the restart app item would make it much easier/quicker when you know its happening instead of having to exit it, go find it in Applications and re-open it.

@lwouis
Copy link
Owner

lwouis commented May 11, 2022

@codewise-nicolas this has been suggested before, as a mitigation as you say. It's really not satisfying though because it loses window focus order. When AltTab starts, it has no idea of the order the windows were focused last. We use their z-index (order in which they are stacked on top of each order) as a proxy, but it's often not correct.

I feel a bit like giving up if we add a button. Like an app shouldn't provide an option to restart because it needs to be restarted daily of something, no? That feels wrong.

@flypenguin
Copy link

hm, honestly? if that restart-button would be actually in the tab switcher, so that i could press CMD-TAB, it opens, and move the mouse to restart immediately, it would definitely suck, but it would be DOABLE. now this is a hassle which is why i am using the standard mac os tab switcher with horrible muscle memory issues. i would like a really really smooth "restart way" a lot.

@Riezebos
Copy link

Thanks for all the great work! Since I installed this app I finally feel like my macbook is nice to use. I tried to get used to the macos shortcuts for a year but was still fighting them all the time.

It's a pity that building this functionality has been made so difficult by Apple. I have the missing window regularly too, it seems to happen more for WebCatalog apps that haven't had any active windows for a while. As a temporary workaround I set up a cli command hoteky using Karabiner to restart alttab quickly when this happens. In case anybody is interested:

osascript -e 'quit app "AltTab"' && open '/Applications/AltTab.app'

@lwouis
Copy link
Owner

lwouis commented May 12, 2022

What I struggle to explain even when the window is missed by AltTab, there is a catch-up mechanism: if the user focuses the missing window, AltTab will add the window to its list, if the window is an actual window, and was missing.

So the fact that you guys can't focus it to list it, seems to indicate that these windows don't pass the isActualWindow test.

@Riezebos
Copy link

I think this has been the case a few times, but I'm not 100% sure. Next time this happens I'll be sure to thoroughly test whether focusing solves it!

@ipeluffo
Copy link

ipeluffo commented May 15, 2022

In case it helps, below there is a recording showing an issue when changing a browser (in this case Brave) to full screen:
https://streamable.com/11xefj

Issue: Brave browser disappears from alt-tab when changing to full screen. After restoring from full screen, the app still doesn't appear in alt-tab.

I checked and the options to full apps in fullscreen is active:
Screenshot 2022-05-15 at 17 38 29

Steps to reproduce the bug

  1. Open browser
  2. Change to full screen (app disappears from alt-tab)
  3. Change back to normal screen (app still doesn't appear in alt-tab)
  4. Reopening alt-tab fixes the issue

Btw, sorry if this wasn't the best issue to add this info.

@lwouis
Copy link
Owner

lwouis commented May 16, 2022

@ipeluffo I downloaded Brave, and reproduced your steps. It worked fine for me.

I'm suspecting you're on macOS 12.3+ and are facing #1324

@ipeluffo
Copy link

@ipeluffo I downloaded Brave, and reproduced your steps. It worked fine for me.

I'm suspecting you're on macOS 12.3+ and are facing #1324

I can confirm I'm running macOS 12.3+. Sorry I've posted this issue here, I didn't see the other one. Feel free to delete or hide the comments. Thanks for the great work on this.

@lwouis
Copy link
Owner

lwouis commented May 28, 2022

I've dug into this again today, and come to the conclusion that it falls under the umbrella of #447. Indeed, the issue here is the following:

  • We rely on subscribing to an app's notifications to know when it creates a new window
  • When an app launches, its initial windows tend to not send such notifications. It could be a macOS bug, or it could be that technically by the windows are created right before we have a chance to subscribe to the app's notifications
  • Such initial windows can be on other Spaces than the current Space

This happens for instance when an app is opened, and some of its windows are restored. If they were fullscreen, they will be restored on other Spaces. Sometimes macOS will then automatically focus on another Space to show the newly open window, but there is an animation to get there which could mean we don't ask for windows during it, and we don't get the window.

More importantly, sometimes macOS will not focus such initial window. For example, if the restored app had multiple windows fullscreen. Then it may focus on of those Space, but not both.

Because we get no notification, and we don't travel to all relevant Spaces, we miss those windows. Let's thus focus the discussion in #447.

@lwouis lwouis closed this as completed May 28, 2022
@lwouis lwouis added the duplicate This issue or pull request already exists label May 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists need breakthrough Need a breakthrough idea to move forwards
Projects
None yet
Development

No branches or pull requests

9 participants