Skip to content

MultitaskingView: Only grab focus on ws switch if we are open - #2894

Merged
lenemter merged 1 commit into
mainfrom
leolost/fix-focus-on-window-move
Aug 12, 2026
Merged

MultitaskingView: Only grab focus on ws switch if we are open#2894
lenemter merged 1 commit into
mainfrom
leolost/fix-focus-on-window-move

Conversation

@leolost2605

Copy link
Copy Markdown
Member

A commit can happen even when we are not open anytime that a workspace was reordered, added or removed. In those cases we don't want to grab focus because that will cause the focused window to stop receiving keyboard input.

A particular case where this was a problem was when moving windows via a gesture or the keyboard shortcut. There when the animation is over we call thaw_remove on the workspace manager and because a window
was moved from a workspace chances are high we will get a new one or one will be removed. In that case the window would immediately stop receiving keyboard
input even though it still appears focused.

Fixes #2884

A commit can happen when we are not open anytime that a
workspace was reordered, added or removed. In those
cases we don't want to grab focus because that will cause
the focused window to stop receiving keyboard input.

A particular case where this was a problem was when
moving windows via a gesture or the keyboard shortcut.
There when the animation is over we call thaw_remove
on the workspace manager and because a window
was moved from a workspace chances are high we will get
a new one or one will be removed. In that case the
window would immediately stop receiving keyboard
input even though it still appears focused.

@lenemter lenemter left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes the issue, good job 🎉

@lenemter
lenemter merged commit 2fafc8c into main Aug 12, 2026
6 checks passed
@lenemter
lenemter deleted the leolost/fix-focus-on-window-move branch August 12, 2026 14:21
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.

Moving to a different workspace loses app focus

2 participants