-
-
Notifications
You must be signed in to change notification settings - Fork 318
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
fix: close preview window after focus completed #2436
Conversation
src/ui/App.swift
Outdated
window.focus() { | ||
Windows.previewFocusedWindowIfNeeded() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This parameter is only passed here, right? Perhaps the method could host it, if it has only 1 possible value, don't you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Thanks for working on this improvement @decodism. Of course, waiting 50ms is not going to work in some cases. Maybe it will avoid 80% of flickers though. I'm really curious what the HyperSwitch implementation does. It's very smooth. |
I tried HyperSwitch and it just seems to use a fade out animation. I find that there is still flickering even if less pronounced. |
Maybe we could add a fadeout aimation too then if it helps smoothen the switch? |
I think what helps is the extended closing time and not the animation itself. |
@decodism I played with it, and I still get flickers sometimes. It's rare though, so I'll merge this as it's clearly an improvement 👍 Thank you |
796a3c3
to
a67d123
Compare
The content of this PR have been cherry-picked onto the master branch, and the latest release of AltTab ships with it. Thank you for your contribution 🙇 |
@lwouis If you are still experiencing flickering, it might be worth increasing the delay. |
Tries to fix #2432. I'm not sure if the 50ms delay is enough. I tried waiting for kAXFocusedWindowChangedNotification but there was still flickering and it was more complicated.