summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@novell.com>2005-01-09 19:26:25 +0000
committerTor Lillqvist <tml@src.gnome.org>2005-01-09 19:26:25 +0000
commit95ab1e7123534178d4ce1783293eeb66ccc9438b (patch)
treeafce34d00af0e4f5e10d88c29610b4d19519b0bc
parentb1167d1d11993f5d9c5306e8d26b7442aa3e5fbf (diff)
downloadgdk-pixbuf-95ab1e7123534178d4ce1783293eeb66ccc9438b.tar.gz
Set current cursor also when changing the cursor of a window that is the
2005-01-09 Tor Lillqvist <tlillqvist@novell.com> * gdk/win32/gdkwindow-win32.c (gdk_window_set_cursor): Set current cursor also when changing the cursor of a window that is the first ancestor of the window containing the pointer that has a cursor defined. (#163035, Ivan Wong)
-rw-r--r--ChangeLog7
-rw-r--r--ChangeLog.pre-2-107
-rw-r--r--ChangeLog.pre-2-67
-rw-r--r--ChangeLog.pre-2-87
-rw-r--r--gdk/win32/gdkwindow-win32.c29
5 files changed, 53 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 28e6eac39..d0dd95463 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-01-09 Tor Lillqvist <tlillqvist@novell.com>
+
+ * gdk/win32/gdkwindow-win32.c (gdk_window_set_cursor): Set current
+ cursor also when changing the cursor of a window that is the first
+ ancestor of the window containing the pointer that has a cursor
+ defined. (#163035, Ivan Wong)
+
2005-01-09 Anders Carlsson <andersca@gnome.org>
* gtk/gtkcellrenderertext.c: (get_size):
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 28e6eac39..d0dd95463 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,10 @@
+2005-01-09 Tor Lillqvist <tlillqvist@novell.com>
+
+ * gdk/win32/gdkwindow-win32.c (gdk_window_set_cursor): Set current
+ cursor also when changing the cursor of a window that is the first
+ ancestor of the window containing the pointer that has a cursor
+ defined. (#163035, Ivan Wong)
+
2005-01-09 Anders Carlsson <andersca@gnome.org>
* gtk/gtkcellrenderertext.c: (get_size):
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index 28e6eac39..d0dd95463 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,10 @@
+2005-01-09 Tor Lillqvist <tlillqvist@novell.com>
+
+ * gdk/win32/gdkwindow-win32.c (gdk_window_set_cursor): Set current
+ cursor also when changing the cursor of a window that is the first
+ ancestor of the window containing the pointer that has a cursor
+ defined. (#163035, Ivan Wong)
+
2005-01-09 Anders Carlsson <andersca@gnome.org>
* gtk/gtkcellrenderertext.c: (get_size):
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 28e6eac39..d0dd95463 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,10 @@
+2005-01-09 Tor Lillqvist <tlillqvist@novell.com>
+
+ * gdk/win32/gdkwindow-win32.c (gdk_window_set_cursor): Set current
+ cursor also when changing the cursor of a window that is the first
+ ancestor of the window containing the pointer that has a cursor
+ defined. (#163035, Ivan Wong)
+
2005-01-09 Anders Carlsson <andersca@gnome.org>
* gtk/gtkcellrenderertext.c: (get_size):
diff --git a/gdk/win32/gdkwindow-win32.c b/gdk/win32/gdkwindow-win32.c
index 99a2e02be..bb7502ac7 100644
--- a/gdk/win32/gdkwindow-win32.c
+++ b/gdk/win32/gdkwindow-win32.c
@@ -1823,10 +1823,31 @@ gdk_window_set_cursor (GdkWindow *window,
hcursor, impl->hcursor));
}
- /* If the pointer is over our window, set new cursor if given */
- if (gdk_window_get_pointer(window, NULL, NULL, NULL) == window)
- if (impl->hcursor != NULL)
- SetCursor (impl->hcursor);
+ if (impl->hcursor != NULL)
+ {
+ /* If the pointer is over our window, set new cursor */
+ GdkWindow *curr_window = gdk_window_get_pointer (window, NULL, NULL, NULL);
+ if (curr_window == window)
+ SetCursor (impl->hcursor);
+ else
+ {
+ /* Climb up the tree and find whether our window is the
+ * first ancestor that has cursor defined, and if so, set
+ * new cursor.
+ */
+ GdkWindowObject *curr_window_obj = GDK_WINDOW_OBJECT (curr_window);
+ while (curr_window_obj &&
+ !GDK_WINDOW_IMPL_WIN32 (curr_window_obj->impl)->hcursor)
+ {
+ curr_window_obj = curr_window_obj->parent;
+ if (curr_window_obj == GDK_WINDOW_OBJECT (window))
+ {
+ SetCursor (impl->hcursor);
+ break;
+ }
+ }
+ }
+ }
/* Destroy the previous cursor: Need to make sure it's no longer in
* use before we destroy it, in case we're not over our window but