[mutter] display: Cancel overlay key presses on mouse button events
- From: Florian MÃllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] display: Cancel overlay key presses on mouse button events
- Date: Tue, 17 Apr 2012 21:54:12 +0000 (UTC)
commit 8809673a7456da060f47d4d7a2ab2272d3b5bc57
Author: Florian MÃllner <fmuellner gnome org>
Date: Mon Dec 12 20:04:20 2011 +0100
display: Cancel overlay key presses on mouse button events
Currently pressing the overlay key only triggers the overview if
no other key is pressed between KeyPress and KeyRelease. Extend
this logic to pointer events, so that KeyPress + ButtonPress actions
are treated explicitly different from "pure" overlay key presses.
In particular, this change allows to re-use the overlay key as mouse
button modifier.
https://bugzilla.gnome.org/show_bug.cgi?id=662476
src/core/display.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/core/display.c b/src/core/display.c
index 8f1fe3c..676cd56 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -1799,6 +1799,8 @@ event_callback (XEvent *event,
if (display->grab_op == META_GRAB_OP_COMPOSITOR)
break;
+ display->overlay_key_only_pressed = FALSE;
+
if (event->xbutton.button == 4 || event->xbutton.button == 5)
/* Scrollwheel event, do nothing and deliver event to compositor below */
break;
@@ -1996,6 +1998,8 @@ event_callback (XEvent *event,
if (display->grab_op == META_GRAB_OP_COMPOSITOR)
break;
+ display->overlay_key_only_pressed = FALSE;
+
if (display->grab_window == window &&
grab_op_is_mouse (display->grab_op))
meta_window_handle_mouse_grab_op_event (window, event);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]