flowbox: remove unused prelight code
It was causing needless redraws https://bugzilla.gnome.org/show_bug.cgi?id=759757
This commit is contained in:
parent
5c704621ac
commit
11ad60d386
@ -799,7 +799,6 @@ struct _GtkFlowBoxPrivate {
|
|||||||
guint row_spacing;
|
guint row_spacing;
|
||||||
guint column_spacing;
|
guint column_spacing;
|
||||||
|
|
||||||
GtkFlowBoxChild *prelight_child;
|
|
||||||
GtkFlowBoxChild *cursor_child;
|
GtkFlowBoxChild *cursor_child;
|
||||||
GtkFlowBoxChild *selected_child;
|
GtkFlowBoxChild *selected_child;
|
||||||
|
|
||||||
@ -919,19 +918,6 @@ gtk_flow_box_find_child_at_pos (GtkFlowBox *box,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
gtk_flow_box_update_prelight (GtkFlowBox *box,
|
|
||||||
GtkFlowBoxChild *child)
|
|
||||||
{
|
|
||||||
GtkFlowBoxPrivate *priv = BOX_PRIV (box);
|
|
||||||
|
|
||||||
if (child != priv->prelight_child)
|
|
||||||
{
|
|
||||||
priv->prelight_child = child;
|
|
||||||
gtk_widget_queue_draw (GTK_WIDGET (box));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gtk_flow_box_update_active (GtkFlowBox *box,
|
gtk_flow_box_update_active (GtkFlowBox *box,
|
||||||
GtkFlowBoxChild *child)
|
GtkFlowBoxChild *child)
|
||||||
@ -2838,7 +2824,6 @@ autoscroll_cb (GtkWidget *widget,
|
|||||||
|
|
||||||
child = gtk_flow_box_find_child_at_pos (box, x, y);
|
child = gtk_flow_box_find_child_at_pos (box, x, y);
|
||||||
|
|
||||||
gtk_flow_box_update_prelight (box, child);
|
|
||||||
gtk_flow_box_update_active (box, child);
|
gtk_flow_box_update_active (box, child);
|
||||||
|
|
||||||
if (child != NULL)
|
if (child != NULL)
|
||||||
@ -2941,7 +2926,6 @@ gtk_flow_box_enter_notify_event (GtkWidget *widget,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
child = gtk_flow_box_find_child_at_pos (box, event->x, event->y);
|
child = gtk_flow_box_find_child_at_pos (box, event->x, event->y);
|
||||||
gtk_flow_box_update_prelight (box, child);
|
|
||||||
gtk_flow_box_update_active (box, child);
|
gtk_flow_box_update_active (box, child);
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -2962,7 +2946,6 @@ gtk_flow_box_leave_notify_event (GtkWidget *widget,
|
|||||||
else
|
else
|
||||||
child = gtk_flow_box_find_child_at_pos (box, event->x, event->y);
|
child = gtk_flow_box_find_child_at_pos (box, event->x, event->y);
|
||||||
|
|
||||||
gtk_flow_box_update_prelight (box, child);
|
|
||||||
gtk_flow_box_update_active (box, child);
|
gtk_flow_box_update_active (box, child);
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -3043,7 +3026,6 @@ gtk_flow_box_motion_notify_event (GtkWidget *widget,
|
|||||||
}
|
}
|
||||||
|
|
||||||
child = gtk_flow_box_find_child_at_pos (box, relative_x, relative_y);
|
child = gtk_flow_box_find_child_at_pos (box, relative_x, relative_y);
|
||||||
gtk_flow_box_update_prelight (box, child);
|
|
||||||
gtk_flow_box_update_active (box, child);
|
gtk_flow_box_update_active (box, child);
|
||||||
|
|
||||||
return GTK_WIDGET_CLASS (gtk_flow_box_parent_class)->motion_notify_event (widget, event);
|
return GTK_WIDGET_CLASS (gtk_flow_box_parent_class)->motion_notify_event (widget, event);
|
||||||
@ -3284,8 +3266,6 @@ gtk_flow_box_remove (GtkContainer *container,
|
|||||||
was_visible = child_is_visible (GTK_WIDGET (child));
|
was_visible = child_is_visible (GTK_WIDGET (child));
|
||||||
was_selected = CHILD_PRIV (child)->selected;
|
was_selected = CHILD_PRIV (child)->selected;
|
||||||
|
|
||||||
if (child == priv->prelight_child)
|
|
||||||
priv->prelight_child = NULL;
|
|
||||||
if (child == priv->active_child)
|
if (child == priv->active_child)
|
||||||
priv->active_child = NULL;
|
priv->active_child = NULL;
|
||||||
if (child == priv->selected_child)
|
if (child == priv->selected_child)
|
||||||
|
Loading…
Reference in New Issue
Block a user