[gimp] Use the standard system mouse cursor over the popup arrow
- From: Michael Natterer <mitch src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp] Use the standard system mouse cursor over the popup arrow
- Date: Thu, 5 Nov 2009 21:48:45 +0000 (UTC)
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]