[gtk+/client-side-windows: 172/284] Only set cursors on toplevel.



commit ca1aeff8140bd0b82fb880a59d96c9be50200458
Author: Alexander Larsson <alexl redhat com>
Date:   Mon Jan 26 12:54:02 2009 +0100

    Only set cursors on toplevel.
    
    This fixes a problem where we used to set them on a native window, but we
    never unset it becase when the pointer moved to another native window
    we just set the cursor on that window. Always setting on the toplevel
    fixes this.
---
 gdk/gdkwindow.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 69fd9b8..824d5f7 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -6575,8 +6575,10 @@ update_cursor (GdkDisplay *display)
   if (display->pointer_grab.window != NULL &&
       !is_parent_of (display->pointer_grab.window, (GdkWindow *)cursor_window))
     cursor_window = (GdkWindowObject *)display->pointer_grab.window;
-  
-  GDK_WINDOW_IMPL_GET_IFACE (pointer_window->impl)->set_cursor ((GdkWindow *)pointer_window,
+
+  /* Set all cursors on toplevel, otherwise its tricky to keep track of
+   * which native window has what cursor set. */
+  GDK_WINDOW_IMPL_GET_IFACE (pointer_window->impl)->set_cursor (gdk_window_get_toplevel ((GdkWindow *)pointer_window),
 								cursor_window->cursor);
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]