[mutter] events: Move the overlay_key_only_pressed handling to keybindings.c
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] events: Move the overlay_key_only_pressed handling to keybindings.c
- Date: Thu, 8 May 2014 19:35:23 +0000 (UTC)
commit f5bff4b7f3f43ace9c513d50d8576bc1170985e6
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Thu May 8 14:58:40 2014 -0400
events: Move the overlay_key_only_pressed handling to keybindings.c
Now the switch statement is entirely about window operations.
src/core/events.c | 9 ---------
src/core/keybindings.c | 5 +++++
2 files changed, 5 insertions(+), 9 deletions(-)
---
diff --git a/src/core/events.c b/src/core/events.c
index 4424386..a40e988 100644
--- a/src/core/events.c
+++ b/src/core/events.c
@@ -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;
}
diff --git a/src/core/keybindings.c b/src/core/keybindings.c
index 751a244..831ddfe 100644
--- a/src/core/keybindings.c
+++ b/src/core/keybindings.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]