File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -467,7 +467,15 @@ export default class WorkspaceManagerOverride {
467
467
} ) ;
468
468
469
469
let event = Clutter . get_current_event ( ) ;
470
- let modifiers = event ? event . get_state ( ) & Clutter . ModifierType . MODIFIER_MASK : 0 ;
470
+ // gnome-shell's SwitcherPopup.show() seems to expect a modifier
471
+ // mask from a configured keybinding, not from an event's state.
472
+ // On Wayland, the event's state includes ambient modifiers like
473
+ // caps lock and numlock (Mod2) that generally wouldn't be part
474
+ // of a keybinding, so we clear those bits so that SwitcherPopup
475
+ // can close the popup when the relevant modifiers are released,
476
+ // instead of waiting for caps/num lock to be released.
477
+ const modifier_mask = Clutter . ModifierType . MODIFIER_MASK & ~ Clutter . ModifierType . LOCK_MASK & ~ Clutter . ModifierType . MOD2_MASK ;
478
+ let modifiers = event ? event . get_state ( ) & modifier_mask : 0 ;
471
479
this . wm . _wsPopupList [ monitorIndex ] . showToggle ( false , null , modifiers , toggle ) ;
472
480
if ( monitorIndex === Main . layoutManager . primaryIndex ) {
473
481
this . wm . _workspaceSwitcherPopup = this . wm . _wsPopupList [ monitorIndex ] ;
You can’t perform that action at this time.
0 commit comments