diff options
author | Matthias Clasen <mclasen@redhat.com> | 2009-07-13 14:48:10 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2009-07-18 00:02:16 -0400 |
commit | 2c341455d81f911aea127c50a01cdcb006b111f5 (patch) | |
tree | 0d5d3db07072d8fcca9691508ef9e033e861fdbd | |
parent | a1650aa27372f2957cd22acc188147be2b3f514b (diff) | |
download | gdk-pixbuf-2c341455d81f911aea127c50a01cdcb006b111f5.tar.gz |
Fix some problems with prelighting of icons in entries
-rw-r--r-- | gtk/gtkentry.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index 92aaaf783..ccdff28f7 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -3398,6 +3398,10 @@ gtk_entry_leave_notify (GtkWidget *widget, if (icon_info != NULL && event->window == icon_info->window) { + /* a grab means that we may never see the button release */ + if (event->mode == GDK_CROSSING_GRAB || event->mode == GDK_CROSSING_GTK_GRAB) + icon_info->pressed = FALSE; + if (should_prelight (entry, i)) { icon_info->prelight = FALSE; @@ -7827,9 +7831,14 @@ gtk_entry_set_icon_sensitive (GtkEntry *entry, { icon_info->insensitive = !sensitive; + icon_info->pressed = FALSE; + icon_info->prelight = FALSE; + if (GTK_WIDGET_REALIZED (GTK_WIDGET (entry))) update_cursors (GTK_WIDGET (entry)); + gtk_widget_queue_draw (GTK_WIDGET (entry)); + g_object_notify (G_OBJECT (entry), icon_pos == GTK_ENTRY_ICON_PRIMARY ? "primary-icon-sensitive" : "secondary-icon-sensitive"); } |