[gtk+] Correct generation of broken grabs
- From: Alexander Larsson <alexl src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtk+] Correct generation of broken grabs
- Date: Thu, 27 Aug 2009 11:22:34 +0000 (UTC)
commit 1932f32ef201268272bff03c590766d1448ddcc8
Author: Alexander Larsson <alexl redhat com>
Date: Thu Aug 27 13:30:20 2009 +0200
Correct generation of broken grabs
We send a broken grab when a *parent* gets unmapped, not when
a child gets unmapped!
gdk/gdkdisplay.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c
index 2d09488..d22ff00 100644
--- a/gdk/gdkdisplay.c
+++ b/gdk/gdkdisplay.c
@@ -1136,7 +1136,9 @@ _gdk_display_has_pointer_grab (GdkDisplay *display,
return NULL;
}
-/* Returns true if last grab was ended */
+/* Returns true if last grab was ended
+ * If if_child is non-NULL, end the grab only if the grabbed
+ * window is the same as if_child or a descendant of it */
gboolean
_gdk_display_end_pointer_grab (GdkDisplay *display,
gulong serial,
@@ -1154,7 +1156,7 @@ _gdk_display_end_pointer_grab (GdkDisplay *display,
grab = l->data;
if (grab &&
(if_child == NULL ||
- _gdk_window_event_parent_of (grab->window, if_child)))
+ _gdk_window_event_parent_of (if_child, grab->window)))
{
grab->serial_end = serial;
grab->implicit_ungrab = implicit;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]