Skip to content

Fixed Focus lost on JumpTo - #68

Open
PrinceOwen9466 wants to merge 1 commit into
widavies:mainfrom
PrinceOwen9466:main
Open

Fixed Focus lost on JumpTo#68
PrinceOwen9466 wants to merge 1 commit into
widavies:mainfrom
PrinceOwen9466:main

Conversation

@PrinceOwen9466

Copy link
Copy Markdown
  • Fixes focus lost on JumpTo
  • Fixes focus lost on JumpTo the same desktop
  • When JumpTo call exceeds desktop count, the last available desktop is selected

Something about calling some IVirtualDesktopAPI APIs makes the active window loose focus.

So as a fix, during jumps, SetForegroundWindow(hwnd); is always called to reassign focus to the first available window in the next desktop.

When the desktop index is the same with the current desktop, it's best to not call any disruptive APIs in the first place and simply skip.

IVirtualDesktopAPI,GetDesktopCount() also causes a loss of active window focus so moving to the last available desktop seems to be an acceptable fix for the meantime.

#62

- Fixes focus lost on JumpTo the same desktop
@widavies

Copy link
Copy Markdown
Owner

Thanks, I'll take a look as soon as I can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants