Fix some problems with prelighting of icons in entries

This commit is contained in:
Matthias Clasen
2009-07-13 14:48:10 -04:00
parent ea3184f129
commit 0e8fe66f09

View File

@ -3555,6 +3555,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;
@ -7991,9 +7995,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");
}