[mutter/wip/gestures: 2/14] frame: Only select for ButtonPress/Release/Motion
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/gestures: 2/14] frame: Only select for ButtonPress/Release/Motion
- Date: Thu, 19 Jun 2014 21:45:37 +0000 (UTC)
commit 5ff50eb466689556b0ed42803fbca5c37e376cac
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Jun 19 21:15:14 2014 +0200
frame: Only select for ButtonPress/Release/Motion
Touch events are largely ignored on GdkEvent emulation, so only
make frames receive pointer events, only the pointer emulating
touch will be reported, and any other further touches will be
ignored, which is about the behavior we want. This makes window
dragging possible again on touch.
src/core/frame.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/core/frame.c b/src/core/frame.c
index 0895241..3e699a6 100644
--- a/src/core/frame.c
+++ b/src/core/frame.c
@@ -109,6 +109,17 @@ meta_window_ensure_frame (MetaWindow *window)
XChangeWindowAttributes (window->display->xdisplay,
frame->xwindow, CWEventMask, &attrs);
+ {
+ unsigned char mask_bits[XIMaskLen (XI_LASTEVENT)] = { 0 };
+ XIEventMask mask = { XIAllMasterDevices, sizeof (mask_bits), mask_bits };
+
+ XISetMask (mask.mask, XI_ButtonPress);
+ XISetMask (mask.mask, XI_ButtonRelease);
+ XISetMask (mask.mask, XI_Motion);
+
+ XISelectEvents (window->display->xdisplay, frame->xwindow, &mask, 1);
+ }
+
meta_display_register_x_window (window->display, &frame->xwindow, window);
meta_error_trap_push (window->display);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]