events: Move the overlay_key_only_pressed handling to keybindings.c

Now the switch statement is entirely about window operations.
This commit is contained in:
Jasper St. Pierre 2014-05-08 14:58:40 -04:00
parent bbfdf5dd2a
commit f5bff4b7f3
2 changed files with 5 additions and 9 deletions

View File

@ -1946,8 +1946,6 @@ meta_display_handle_event (MetaDisplay *display,
if (grab_op_should_block_mouse_events (display->grab_op))
break;
display->overlay_key_only_pressed = FALSE;
if (window && display->grab_op == META_GRAB_OP_NONE)
{
ClutterModifierType grab_mask;
@ -2104,13 +2102,6 @@ meta_display_handle_event (MetaDisplay *display,
}
break;
case CLUTTER_BUTTON_RELEASE:
if (grab_op_should_block_mouse_events (display->grab_op))
break;
display->overlay_key_only_pressed = FALSE;
break;
default:
break;
}

View File

@ -1860,6 +1860,11 @@ meta_keybindings_process_event (MetaDisplay *display,
{
switch (event->type)
{
case CLUTTER_BUTTON_PRESS:
case CLUTTER_BUTTON_RELEASE:
display->overlay_key_only_pressed = FALSE;
return FALSE;
case CLUTTER_KEY_PRESS:
case CLUTTER_KEY_RELEASE:
return process_key_event (display, window, (ClutterKeyEvent *) event);