[mutter/wip/multitouch: 9/73] display: get button events state from helper functions
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/multitouch: 9/73] display: get button events state from helper functions
- Date: Mon, 31 Oct 2011 00:17:24 +0000 (UTC)
commit 90287cb3f65c0136e49e92d9f7247238c7c07df1
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Jun 8 18:57:28 2011 +0200
display: get button events state from helper functions
src/core/display.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/core/display.c b/src/core/display.c
index 3e97dff..06a14bf 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -1730,7 +1730,7 @@ event_callback (XEvent *event,
{
Window xwindow = meta_input_event_get_window (display, event);
Time evtime = meta_input_event_get_time (display, event);
- guint n_button;
+ guint n_button, state;
if (window && !window->override_redirect &&
((evtype == KeyPress) || (evtype == ButtonPress)))
@@ -1770,6 +1770,7 @@ event_callback (XEvent *event,
break;
case ButtonPress:
meta_input_event_get_button (display, event, &n_button);
+ meta_input_event_get_state (display, event, &state);
if (display->grab_op == META_GRAB_OP_COMPOSITOR)
break;
@@ -1819,7 +1820,7 @@ event_callback (XEvent *event,
* frame, the other is our focus_window_grab on unmodified
* button 1. So for all such events we focus the window.
*/
- unmodified = (event->xbutton.state & grab_mask) == 0;
+ unmodified = (state & grab_mask) == 0;
if (unmodified || n_button == 1)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]