summaryrefslogtreecommitdiff
path: root/gdk/x11
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2015-12-16 19:21:33 +0100
committerCarlos Garnacho <carlosg@gnome.org>2015-12-16 19:47:06 +0100
commit24afce5650b2ed14eb5bc066d0f93a0ae636b200 (patch)
treef1d0d5ee222c5989c9a5d623c5754e1d86a4c04e /gdk/x11
parent7ead57be8c3d67b00608f67e2c63a796da8e8388 (diff)
downloadgtk+-24afce5650b2ed14eb5bc066d0f93a0ae636b200.tar.gz
x11: Make fallback window dragging use seat grabs
Also, gdk_seat_ungrab() will undo the implicit grab when EWMH dragging is used.
Diffstat (limited to 'gdk/x11')
-rw-r--r--gdk/x11/gdkwindow-x11.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index 3baa1a1f80..157ec3a888 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -4686,7 +4686,7 @@ wmspec_moveresize (GdkWindow *window,
GdkDisplay *display = GDK_WINDOW_DISPLAY (window);
if (button != 0)
- gdk_device_ungrab (device, timestamp); /* Release passive grab */
+ gdk_seat_ungrab (gdk_device_get_seat (device)); /* Release passive grab */
GDK_X11_DISPLAY (display)->wm_moveresize_button = button;
wmspec_send_message (display, window, root_x, root_y, direction, button);
@@ -5145,13 +5145,10 @@ create_moveresize_window (MoveResizeData *mv_resize,
gdk_window_show (mv_resize->moveresize_emulation_window);
- status = gdk_device_grab (mv_resize->device,
- mv_resize->moveresize_emulation_window,
- GDK_OWNERSHIP_NONE,
- FALSE,
- GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK,
- NULL,
- timestamp);
+ status = gdk_seat_grab (gdk_device_get_seat (mv_resize->device),
+ mv_resize->moveresize_emulation_window,
+ GDK_SEAT_CAPABILITY_POINTER, FALSE,
+ NULL, NULL, NULL, NULL);
if (status != GDK_GRAB_SUCCESS)
{
@@ -5663,7 +5660,7 @@ gdk_x11_window_show_window_menu (GdkWindow *window,
NULL);
/* Ungrab the implicit grab */
- gdk_device_ungrab (device, gdk_event_get_time (event));
+ gdk_seat_ungrab (gdk_device_get_seat (device));
xclient.type = ClientMessage;
xclient.window = GDK_WINDOW_XID (window);