iconview: Don't queue redraws when nothing changes
We were queueing redraws for the old and the new prelit item, even when they were the same item.
This commit is contained in:
parent
45ab4ae09b
commit
86607c0f21
@ -2038,21 +2038,23 @@ gtk_icon_view_motion (GtkWidget *widget,
|
||||
FALSE,
|
||||
&cell);
|
||||
|
||||
if (item != NULL)
|
||||
if (item != last_prelight_item)
|
||||
{
|
||||
item->prelight = TRUE;
|
||||
gtk_icon_view_queue_draw_item (icon_view, item);
|
||||
}
|
||||
if (item != NULL)
|
||||
{
|
||||
item->prelight = TRUE;
|
||||
gtk_icon_view_queue_draw_item (icon_view, item);
|
||||
}
|
||||
|
||||
if (last_prelight_item != NULL &&
|
||||
last_prelight_item != item)
|
||||
{
|
||||
last_prelight_item->prelight = FALSE;
|
||||
gtk_icon_view_queue_draw_item (icon_view,
|
||||
icon_view->priv->last_prelight);
|
||||
}
|
||||
if (last_prelight_item != NULL)
|
||||
{
|
||||
last_prelight_item->prelight = FALSE;
|
||||
gtk_icon_view_queue_draw_item (icon_view,
|
||||
icon_view->priv->last_prelight);
|
||||
}
|
||||
|
||||
icon_view->priv->last_prelight = item;
|
||||
icon_view->priv->last_prelight = item;
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
Loading…
Reference in New Issue
Block a user