[gtk+/client-side-windows: 51/284] For implicit grabs, we grab the *event* window, not the pointer window
- From: Alexander Larsson <alexl src gnome org>
- To: svn-commits-list gnome org
- Subject: [gtk+/client-side-windows: 51/284] For implicit grabs, we grab the *event* window, not the pointer window
- Date: Thu, 2 Apr 2009 14:04:00 -0400 (EDT)
commit d093be43e7456f39ea678081aafd828b0e710d84
Author: Alexander Larsson <alexl redhat com>
Date: Mon Dec 15 14:26:10 2008 +0100
For implicit grabs, we grab the *event* window, not the pointer window
---
gdk/gdkwindow.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 9bfc8c7..a823e03 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -7386,6 +7386,7 @@ proxy_button_event (GdkEvent *source_event)
GdkEventType type;
gdouble toplevel_x, toplevel_y;
GdkDisplay *display;
+ GdkWindowObject *w;
type = source_event->any.type;
toplevel_window = source_event->any.window;
@@ -7403,6 +7404,17 @@ proxy_button_event (GdkEvent *source_event)
_gdk_window_find_descendant_at (toplevel_window,
toplevel_x, toplevel_y,
NULL, NULL);
+
+ /* Find the actual event window, its what gets the grab */
+ w = (GdkWindowObject *)pointer_window;
+ while (w != NULL && w->parent->window_type != GDK_WINDOW_ROOT)
+ {
+ if (w->event_mask & GDK_BUTTON_PRESS_MASK)
+ break;
+ w = w->parent;
+ }
+ pointer_window = w;
+
if (pointer_window != NULL &&
pointer_window != source_event->any.window)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]