]> Pileus Git - ~andy/gtk/commitdiff
Handle theme == NULL.
authorOwen Taylor <otaylor@redhat.com>
Thu, 25 Aug 2005 19:22:29 +0000 (19:22 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Thu, 25 Aug 2005 19:22:29 +0000 (19:22 +0000)
2005-08-25  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkcursor-x11.c (gdk_x11_display_set_cursor_theme):
        Handle theme == NULL.

ChangeLog
ChangeLog.pre-2-10
gdk/x11/gdkcursor-x11.c

index 55eb8d14fcd5d38bdb87841fd7bfd4db8c661e51..43328682b0583b1b6069f3b3bfa6aabd87edf9e8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-08-25  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/gdkcursor-x11.c (gdk_x11_display_set_cursor_theme): 
+       Handle theme == NULL.
+
 2005-08-25  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtkmenutoolbutton.c (menu_position_func): Take widget
index 55eb8d14fcd5d38bdb87841fd7bfd4db8c661e51..43328682b0583b1b6069f3b3bfa6aabd87edf9e8 100644 (file)
@@ -1,3 +1,8 @@
+2005-08-25  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/gdkcursor-x11.c (gdk_x11_display_set_cursor_theme): 
+       Handle theme == NULL.
+
 2005-08-25  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtkmenutoolbutton.c (menu_position_func): Take widget
index c816b5d656961d61c3f73851c89b0f527b1d9175..fb4f53b149b628549424ea675a63f062491c47e6 100644 (file)
@@ -446,7 +446,8 @@ update_cursor (gpointer key,
 /**
  * gdk_x11_display_set_cursor_theme:
  * @display: a #GdkDisplay
- * @theme: the name of the cursor theme to use
+ * @theme: the name of the cursor theme to use, or %NULL to unset
+ *         a previously set value
  * @size: the cursor size to use
  *
  * Sets the cursor theme from which the images for cursor
@@ -481,8 +482,9 @@ gdk_x11_display_set_cursor_theme (GdkDisplay  *display,
   old_theme = XcursorGetTheme (xdisplay);
   old_size = XcursorGetDefaultSize (xdisplay);
 
-  if (old_size == size && 
-      old_theme && strcmp (old_theme, theme) == 0)
+  if (old_size == size &&
+      (old_theme == theme ||
+       (old_theme && theme && strcmp (old_theme, theme) == 0)))
     return;
 
   theme_serial++;