mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 08:00:42 -05:00
keybindings: filter overlay key even when not-modal
mutter currently only filters the overlay key through the shell when there is a grab operation and that grab operation belongs to the shell (because the shell is pushModal'd). This means the shell can't filter out overlay key press events events at startup (since the shell isn't normally modal). This commit changes the code to always run the shell filtering code, even when the shell is not modal. https://bugzilla.gnome.org/show_bug.cgi?id=694837
This commit is contained in:
parent
99cfbac473
commit
377e2ed8a5
@ -1707,23 +1707,21 @@ process_overlay_key (MetaDisplay *display,
|
||||
}
|
||||
else if (event->evtype == XI_KeyRelease)
|
||||
{
|
||||
MetaKeyBinding *binding;
|
||||
|
||||
display->overlay_key_only_pressed = FALSE;
|
||||
/* We want to unfreeze events, but keep the grab so that if the user
|
||||
* starts typing into the overlay we get all the keys */
|
||||
XIAllowEvents (display->xdisplay, event->deviceid,
|
||||
XIAsyncDevice, event->time);
|
||||
|
||||
if (display->grab_op == META_GRAB_OP_COMPOSITOR)
|
||||
{
|
||||
MetaKeyBinding *binding =
|
||||
display_get_keybinding (display,
|
||||
display->overlay_key_combo.keysym,
|
||||
display->overlay_key_combo.keycode,
|
||||
display->grab_mask);
|
||||
if (binding &&
|
||||
meta_compositor_filter_keybinding (display->compositor, screen, binding))
|
||||
return TRUE;
|
||||
}
|
||||
binding = display_get_keybinding (display,
|
||||
display->overlay_key_combo.keysym,
|
||||
display->overlay_key_combo.keycode,
|
||||
display->grab_mask);
|
||||
if (binding &&
|
||||
meta_compositor_filter_keybinding (display->compositor, screen, binding))
|
||||
return TRUE;
|
||||
meta_display_overlay_key_activate (display);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user