[gtk+/xi2] check_grab_destroy() now runs through all devices
- From: Kristian Rietveld <kristian src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/xi2] check_grab_destroy() now runs through all devices
- Date: Mon, 10 May 2010 20:35:16 +0000 (UTC)
commit ed8e5564b95120450aafae36499d8ae7826f4fd3
Author: Kristian Rietveld <kris gtk org>
Date: Mon May 10 22:29:27 2010 +0200
check_grab_destroy() now runs through all devices
Pointed out by Carlos Garnacho.
gdk/quartz/gdkwindow-quartz.c | 24 ++++++++++++++++++------
1 files changed, 18 insertions(+), 6 deletions(-)
---
diff --git a/gdk/quartz/gdkwindow-quartz.c b/gdk/quartz/gdkwindow-quartz.c
index 9824964..05b9170 100644
--- a/gdk/quartz/gdkwindow-quartz.c
+++ b/gdk/quartz/gdkwindow-quartz.c
@@ -162,17 +162,29 @@ check_grab_unmap (GdkWindow *window)
static void
check_grab_destroy (GdkWindow *window)
{
+ GList *list, *l;
GdkDisplay *display = gdk_drawable_get_display (window);
- GdkDeviceGrabInfo *grab;
+ GdkDeviceManager *device_manager;
/* Make sure there is no lasting grab in this native window */
- grab = _gdk_display_get_last_device_grab (display, display->core_pointer);
- if (grab && grab->native_window == window)
+ device_manager = gdk_display_get_device_manager (display);
+ list = gdk_device_manager_list_devices (device_manager,
+ GDK_DEVICE_TYPE_MASTER);
+
+ for (l = list; l; l = l->next)
{
- /* Serials are always 0 in quartz, but for clarity: */
- grab->serial_end = grab->serial_start;
- grab->implicit_ungrab = TRUE;
+ GdkDeviceGrabInfo *grab;
+
+ grab = _gdk_display_get_last_device_grab (display, l->data);
+ if (grab && grab->native_window == window)
+ {
+ /* Serials are always 0 in quartz, but for clarity: */
+ grab->serial_end = grab->serial_start;
+ grab->implicit_ungrab = TRUE;
+ }
}
+
+ g_list_free (list);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]