Skip to content

Commit 07a1467

Browse files
authored
MultitaskingView: Fix escape after workspace switch (#2828)
After a workspace switch you currently have to press one of the arrow keys once so that the gala.root captures the input focus again and only then pressing esc will work. This PR makes sure it will always work after switching workspaces.
1 parent 813d323 commit 07a1467

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/Widgets/MultitaskingView/MultitaskingView.vala

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,12 @@ public class Gala.MultitaskingView : Root, RootTarget, ActivatableComponent {
278278
} else {
279279
target_workspace.activate (display.get_current_time ());
280280
}
281+
282+
/* Activating a workspace will set the input focus to the stage so recapture it
283+
(Gala.Root will automatically recapture it if we try to move the focus but we want
284+
it right away for escape to work) */
285+
grab_key_focus ();
286+
281287
break;
282288

283289
default:

0 commit comments

Comments
 (0)