]> Pileus Git - ~andy/gtk/commitdiff
gdk: Use the last alive grab in order to get the event window
authorMatthias Clasen <mclasen@redhat.com>
Thu, 1 Mar 2012 15:44:10 +0000 (10:44 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 1 Mar 2012 21:25:27 +0000 (16:25 -0500)
If an active grab kicks in on a different window, _gdk_display_has_device_grab()
would still find the former implicit grab for the window below the pointer, thus
sending events to an unrelated place.

gdk/gdkwindow.c

index 63a645a3e787df2df995d73d189cb5824dfb3538..3478502f627a723a2c36c666410831243cc19d83 100644 (file)
@@ -9147,7 +9147,7 @@ get_event_window (GdkDisplay                 *display,
   GdkTouchGrabInfo *touch_grab;
 
   touch_grab = _gdk_display_has_touch_grab (display, device, sequence, serial);
-  grab = _gdk_display_has_device_grab (display, device, serial);
+  grab = _gdk_display_get_last_device_grab (display, device);
 
   if (touch_grab != NULL &&
       (!grab || grab->implicit || touch_grab->serial >= grab->serial_start))