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

Window from last switched desktop focused when switching to another desktop #5

Closed
mintyleaf opened this issue Apr 9, 2022 · 5 comments
Labels
bug Something isn't working
Milestone

Comments

@mintyleaf
Copy link

Hello!
When i switch to another desktop - there are no windows focused, so i need to manually press alt+tab or click window by mouse to start it grab input (like browser, terminal e.t.c.)

Using 4.0.0 beta 5 on Windows 11 Pro 21H2

@hwtnb hwtnb added the bug Something isn't working label Sep 1, 2022
@hwtnb hwtnb added this to the v4.0.0-beta.6 milestone Sep 1, 2022
@mintyleaf
Copy link
Author

after some usage i just found that when switching desktop the last focused windows from switched desktop simply remains focused
that way, i'm often accidently typing something in address bar of chrome from switched desktop, and to code editor vice versa =D

@mintyleaf mintyleaf changed the title No window focused when switching to desktop Window from last switched desktop focused when switching to another desktop Sep 2, 2022
@hwtnb
Copy link
Owner

hwtnb commented Sep 15, 2022

@mintyleaf Thanks for your report.

It is not easy to fix the issue completely because of foreground restriction on Windows (https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setforegroundwindow#remarks).
But I have made good progress. I would appreciate that you test the below binary because the desktop state (e.g. what applcations are running) is relevant to the issue.
https://github.com/hwtnb/SylphyHornPlusWin11/releases/download/v4.0.0-beta.5/SylphyHornPlus-Ver4.0.0-beta.5-fixWindowFocus.zip

There is a performance issue when switching desktops very frequently and quickly (less 1s).
It is difficult to avoid performance degradation, although it seems to be little problem in practical use.

@mintyleaf
Copy link
Author

@mintyleaf Thanks for your report.

It is not easy to fix the issue completely because of foreground restriction on Windows (docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setforegroundwindow#remarks). But I have made good progress. I would appreciate that you test the below binary because the desktop state (e.g. what applcations are running) is relevant to the issue. v4.0.0-beta.5 SylphyHornPlus-Ver4.0.0-beta.5-fixWindowFocus.zip (download)

There is a performance issue when switching desktops very frequently and quickly (less 1s). It is difficult to avoid performance degradation, although it seems to be little problem in practical use.

tested it out - now it's working like a charm
yeah, seems like there is performance issue when quick switching (which is really not issue for practical use)

@hwtnb
Copy link
Owner

hwtnb commented Sep 16, 2022

@mintyleaf Thanks for your contribution!

I will commit the fix before long.

@hwtnb
Copy link
Owner

hwtnb commented Sep 19, 2022

I have released beta.6, so the issue is closed.

@hwtnb hwtnb closed this as completed Sep 19, 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
Projects
None yet
Development

No branches or pull requests

2 participants