[gimp] Use the standard system mouse cursor over the popup arrow



commit dd3c1d5eb5ff7c1680fedde809ad906af95b6fe7
Author: Michael Natterer <mitch gimp org>
Date:   Thu Nov 5 22:48:11 2009 +0100

    Use the standard system mouse cursor over the popup arrow

 app/widgets/gimpcombotagentry.c |   19 +++++++++++++------
 1 files changed, 13 insertions(+), 6 deletions(-)
---
diff --git a/app/widgets/gimpcombotagentry.c b/app/widgets/gimpcombotagentry.c
index 74c9754..b8f1be2 100644
--- a/app/widgets/gimpcombotagentry.c
+++ b/app/widgets/gimpcombotagentry.c
@@ -285,7 +285,7 @@ gimp_combo_tag_entry_event (GtkWidget *widget,
 
           if (gimp_combo_tag_entry_arrow_hit_test (entry, motion_event->x, motion_event->y))
             {
-              cursor_type = GDK_ARROW;
+              cursor_type = -1;
             }
           else
             {
@@ -294,13 +294,20 @@ gimp_combo_tag_entry_event (GtkWidget *widget,
 
           if (cursor_type != entry->cursor_type)
             {
-              GdkDisplay *display;
-              GdkCursor  *cursor;
+              GdkCursor *cursor = NULL;
+
+              if (cursor_type != -1)
+                {
+                  GdkDisplay *display;
+
+                  display = gtk_widget_get_display (widget);
+                  cursor = gdk_cursor_new_for_display (display, cursor_type);
+                }
 
-              display = gtk_widget_get_display (widget);
-              cursor = gdk_cursor_new_for_display (display, cursor_type);
               gdk_window_set_cursor (motion_event->window, cursor);
-              gdk_cursor_unref (cursor);
+
+              if (cursor)
+                gdk_cursor_unref (cursor);
 
               entry->cursor_type = cursor_type;
             }



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