summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2009-12-07 09:58:34 +0100
committerAlexander Larsson <alexl@redhat.com>2009-12-07 10:52:48 +0100
commit141366a0409da81649c165e99c490407ab78ad80 (patch)
tree3de53bcca21f207b7f1ddf649a0e26601d8c9901
parent4a92edd10a33b3826959263b0726fb402dd07ef2 (diff)
downloadgdk-pixbuf-141366a0409da81649c165e99c490407ab78ad80.tar.gz
Fix mouse pointer handling on multiple screens
The fix in 786b589d95077b465dcc2311ff2489ee7bb9a49f for the "Cannot click buttons more than once without moving the mouse cursor" did not correctly handle setups with multiple screens in one display. We need to handle the case where the first XQueryPointer returns a different root window than the default one. This fixes bug 597386 (agaion) (cherry picked from commit 48fc0f36c28fb0317a3433bafbe7bf8ae8a01171)
-rw-r--r--gdk/x11/gdkwindow-x11.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index e0ee2b019..df7f1ac8d 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -3256,7 +3256,7 @@ _gdk_windowing_window_at_pointer (GdkDisplay *display,
xwindow_last = xwindow;
XQueryPointer (xdisplay, xwindow,
&root, &xwindow, &rootx, &rooty, &winx, &winy, &xmask);
- if (get_toplevel &&
+ if (get_toplevel && xwindow_last != root &&
(window = gdk_window_lookup_for_display (display, xwindow_last)) != NULL &&
GDK_WINDOW_TYPE (window) != GDK_WINDOW_FOREIGN)
{
@@ -3326,7 +3326,7 @@ _gdk_windowing_window_at_pointer (GdkDisplay *display,
gdk_flush ();
if (gdk_error_trap_pop ())
break;
- if (get_toplevel &&
+ if (get_toplevel && xwindow_last != root &&
(window = gdk_window_lookup_for_display (display, xwindow_last)) != NULL &&
GDK_WINDOW_TYPE (window) != GDK_WINDOW_FOREIGN)
break;