diff options
author | Richard Hughes <richard@hughsie.com> | 2014-03-18 15:38:50 +0000 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2014-03-18 15:38:50 +0000 |
commit | e1fc4bd12b4d7725113b7423fb4d2e60bf304434 (patch) | |
tree | 081ed68f26bfcc214d115d3a7728e5f934638e7a /0001-x11-Fallback-to-emulated-window-dragging-for-touch-d.patch | |
parent | backport patches for touch dragging of new-style GNOME windows (diff) | |
download | gtk3-classic-build-gtk3-e1fc4bd12b4d7725113b7423fb4d2e60bf304434.tar.gz gtk3-classic-build-gtk3-e1fc4bd12b4d7725113b7423fb4d2e60bf304434.tar.bz2 gtk3-classic-build-gtk3-e1fc4bd12b4d7725113b7423fb4d2e60bf304434.zip |
Update to 3.11.9
Diffstat (limited to '0001-x11-Fallback-to-emulated-window-dragging-for-touch-d.patch')
-rw-r--r-- | 0001-x11-Fallback-to-emulated-window-dragging-for-touch-d.patch | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/0001-x11-Fallback-to-emulated-window-dragging-for-touch-d.patch b/0001-x11-Fallback-to-emulated-window-dragging-for-touch-d.patch deleted file mode 100644 index b877758..0000000 --- a/0001-x11-Fallback-to-emulated-window-dragging-for-touch-d.patch +++ /dev/null @@ -1,79 +0,0 @@ -From d1d4c602e09c0038cc8e20f3660859af4378b997 Mon Sep 17 00:00:00 2001 -From: Carlos Garnacho <carlosg@gnome.org> -Date: Thu, 13 Mar 2014 20:19:26 +0100 -Subject: [PATCH 1/3] x11: Fallback to emulated window dragging for touch - devices - -Sadly, EWMH moveresize mechanism can't work with touch devices for two -reasons: - -1) As a mutter implementation detail, the device is queried in order -to check whether the dragging button is still pressed. Touch devices -won't report the button 1 being pressed through pointer emulation. -2) Even bypassing that check, on X11 touch events are selected prior -to sequences being started, either through XISelectEvents or -XIGrabTouchBegin, no late registering through active grabs is allowed, -as WMs do on reaction to EWMH moveresize messages. - -So for the time being, make touch devices fallback on emulated window -dragging, which at least allows for moving windows. - -https://bugzilla.gnome.org/show_bug.cgi?id=709914 ---- - gdk/x11/gdkwindow-x11.c | 26 ++++++++++++++++++++++---- - 1 file changed, 22 insertions(+), 4 deletions(-) - -diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c -index 5696e95..08ef713 100644 ---- a/gdk/x11/gdkwindow-x11.c -+++ b/gdk/x11/gdkwindow-x11.c -@@ -5303,6 +5303,24 @@ emulate_move_drag (GdkWindow *window, - create_moveresize_window (mv_resize, timestamp); - } - -+static gboolean -+_should_perform_ewmh_drag (GdkWindow *window, -+ GdkDevice *device) -+{ -+ GdkPointerWindowInfo *info; -+ GdkDisplay *display; -+ -+ display = gdk_window_get_display (window); -+ info = _gdk_display_get_pointer_info (display, device); -+ -+ if ((!info->last_slave || gdk_device_get_source (info->last_slave) != GDK_SOURCE_TOUCHSCREEN) && -+ gdk_x11_screen_supports_net_wm_hint (GDK_WINDOW_SCREEN (window), -+ gdk_atom_intern_static_string ("_NET_WM_MOVERESIZE"))) -+ return TRUE; -+ -+ return FALSE; -+} -+ - static void - gdk_x11_window_begin_resize_drag (GdkWindow *window, - GdkWindowEdge edge, -@@ -5316,8 +5334,8 @@ gdk_x11_window_begin_resize_drag (GdkWindow *window, - !WINDOW_IS_TOPLEVEL_OR_FOREIGN (window)) - return; - -- if (gdk_x11_screen_supports_net_wm_hint (GDK_WINDOW_SCREEN (window), -- gdk_atom_intern_static_string ("_NET_WM_MOVERESIZE"))) -+ /* Avoid EWMH for touch devices */ -+ if (_should_perform_ewmh_drag (window, device)) - wmspec_resize_drag (window, edge, device, button, root_x, root_y, timestamp); - else - emulate_resize_drag (window, edge, device, button, root_x, root_y, timestamp); -@@ -5341,8 +5359,8 @@ gdk_x11_window_begin_move_drag (GdkWindow *window, - else - direction = _NET_WM_MOVERESIZE_MOVE; - -- if (gdk_x11_screen_supports_net_wm_hint (GDK_WINDOW_SCREEN (window), -- gdk_atom_intern_static_string ("_NET_WM_MOVERESIZE"))) -+ /* Avoid EWMH for touch devices */ -+ if (_should_perform_ewmh_drag (window, device)) - wmspec_moveresize (window, direction, device, button, root_x, root_y, timestamp); - else - emulate_move_drag (window, device, button, root_x, root_y, timestamp); --- -1.9.0 - |