Commit bbb70857 authored by Benjamin Otte's avatar Benjamin Otte
Browse files

gtk: Remove all gtk_widget_set_redraw_on_allocate() calls

They're either wrong (when using FALSE because the widgets don't account
for changes to the CSS) or unnecessary (when using TRUE because it's the
default).

Fixes !1777
parent f35ce263
Pipeline #70936 passed with stage
in 12 minutes and 24 seconds
......@@ -297,7 +297,6 @@ gtk_alignment_init (GtkAlignment *alignment)
priv = alignment->priv;
gtk_widget_set_has_window (GTK_WIDGET (alignment), FALSE);
gtk_widget_set_redraw_on_allocate (GTK_WIDGET (alignment), FALSE);
priv->xalign = 0.5;
priv->yalign = 0.5;
......
......@@ -507,7 +507,6 @@ gtk_table_init (GtkTable *table)
priv = table->priv;
gtk_widget_set_has_window (GTK_WIDGET (table), FALSE);
gtk_widget_set_redraw_on_allocate (GTK_WIDGET (table), FALSE);
priv->children = NULL;
priv->rows = NULL;
......
......@@ -362,8 +362,6 @@ gtk_action_bar_init (GtkActionBar *action_bar)
GtkActionBarPrivate *priv = gtk_action_bar_get_instance_private (action_bar);
GtkCssNode *widget_node;
gtk_widget_set_redraw_on_allocate (widget, TRUE);
gtk_widget_init_template (GTK_WIDGET (action_bar));
gtk_revealer_set_transition_type (GTK_REVEALER (priv->revealer), GTK_REVEALER_TRANSITION_TYPE_SLIDE_UP);
......
......@@ -2099,7 +2099,6 @@ gtk_box_init (GtkBox *box)
private = box->priv;
gtk_widget_set_has_window (GTK_WIDGET (box), FALSE);
gtk_widget_set_redraw_on_allocate (GTK_WIDGET (box), FALSE);
private->orientation = GTK_ORIENTATION_HORIZONTAL;
private->children = NULL;
......
......@@ -640,7 +640,6 @@ static void
gtk_flow_box_child_init (GtkFlowBoxChild *child)
{
gtk_widget_set_can_focus (GTK_WIDGET (child), TRUE);
gtk_widget_set_redraw_on_allocate (GTK_WIDGET (child), TRUE);
CHILD_PRIV (child)->gadget = gtk_css_custom_gadget_new_for_node (gtk_widget_get_css_node (GTK_WIDGET (child)),
GTK_WIDGET (child),
......@@ -4106,7 +4105,6 @@ gtk_flow_box_init (GtkFlowBox *box)
GtkCssNode *widget_node;
gtk_widget_set_has_window (GTK_WIDGET (box), TRUE);
gtk_widget_set_redraw_on_allocate (GTK_WIDGET (box), TRUE);
priv->orientation = GTK_ORIENTATION_HORIZONTAL;
priv->selection_mode = GTK_SELECTION_SINGLE;
......
......@@ -1831,7 +1831,6 @@ gtk_grid_init (GtkGrid *grid)
priv = grid->priv;
gtk_widget_set_has_window (GTK_WIDGET (grid), FALSE);
gtk_widget_set_redraw_on_allocate (GTK_WIDGET (grid), FALSE);
priv->children = NULL;
priv->orientation = GTK_ORIENTATION_HORIZONTAL;
......
......@@ -2131,7 +2131,6 @@ gtk_header_bar_init (GtkHeaderBar *bar)
priv = gtk_header_bar_get_instance_private (bar);
gtk_widget_set_has_window (GTK_WIDGET (bar), FALSE);
gtk_widget_set_redraw_on_allocate (GTK_WIDGET (bar), FALSE);
priv->title = NULL;
priv->subtitle = NULL;
......
......@@ -506,8 +506,6 @@ gtk_info_bar_init (GtkInfoBar *info_bar)
priv = info_bar->priv = gtk_info_bar_get_instance_private (info_bar);
gtk_widget_set_redraw_on_allocate (widget, TRUE);
/* message-type is a CONSTRUCT property, so we init to a value
* different from its default to trigger its property setter
* during construction */
......
......@@ -665,7 +665,6 @@ gtk_list_box_init (GtkListBox *box)
GtkCssNode *widget_node;
gtk_widget_set_has_window (widget, TRUE);
gtk_widget_set_redraw_on_allocate (widget, TRUE);
priv->selection_mode = GTK_SELECTION_SINGLE;
priv->activate_single_click = TRUE;
......@@ -3934,7 +3933,6 @@ static void
gtk_list_box_row_init (GtkListBoxRow *row)
{
gtk_widget_set_can_focus (GTK_WIDGET (row), TRUE);
gtk_widget_set_redraw_on_allocate (GTK_WIDGET (row), TRUE);
ROW_PRIV (row)->activatable = TRUE;
ROW_PRIV (row)->selectable = TRUE;
......
......@@ -1896,11 +1896,6 @@ gtk_paned_init (GtkPaned *paned)
gtk_widget_set_has_window (GTK_WIDGET (paned), FALSE);
gtk_widget_set_can_focus (GTK_WIDGET (paned), TRUE);
/* We only need to redraw when the handle position moves, which is
* independent of the overall allocation of the GtkPaned
*/
gtk_widget_set_redraw_on_allocate (GTK_WIDGET (paned), FALSE);
paned->priv = gtk_paned_get_instance_private (paned);
priv = paned->priv;
......
......@@ -268,7 +268,6 @@ gtk_path_bar_init (GtkPathBar *path_bar)
G_CALLBACK (gtk_path_bar_scroll_down), path_bar);
gtk_widget_set_has_window (GTK_WIDGET (path_bar), FALSE);
gtk_widget_set_redraw_on_allocate (GTK_WIDGET (path_bar), FALSE);
context = gtk_widget_get_style_context (GTK_WIDGET (path_bar));
gtk_style_context_add_class (context, "path-bar");
......
......@@ -144,7 +144,6 @@ gtk_revealer_init (GtkRevealer *revealer)
priv->target_pos = 0.0;
gtk_widget_set_has_window ((GtkWidget*) revealer, TRUE);
gtk_widget_set_redraw_on_allocate ((GtkWidget*) revealer, FALSE);
}
static void
......
......@@ -205,7 +205,6 @@ gtk_statusbar_init (GtkStatusbar *statusbar)
priv->keys = NULL;
gtk_widget_init_template (GTK_WIDGET (statusbar));
gtk_widget_set_redraw_on_allocate (GTK_WIDGET (statusbar), TRUE);
}
/**
......
......@@ -1762,9 +1762,6 @@ gtk_text_view_init (GtkTextView *text_view)
priv->text_window = text_window_new (GTK_TEXT_WINDOW_TEXT,
widget, 200, 200);
/* We handle all our own redrawing */
gtk_widget_set_redraw_on_allocate (widget, FALSE);
priv->multipress_gesture = gtk_gesture_multi_press_new (widget);
gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (priv->multipress_gesture), 0);
g_signal_connect (priv->multipress_gesture, "pressed",
......
......@@ -402,8 +402,6 @@ gtk_tool_item_group_init (GtkToolItemGroup *group)
GtkToolItemGroupPrivate* priv;
GtkCssNode *widget_node;
gtk_widget_set_redraw_on_allocate (GTK_WIDGET (group), FALSE);
group->priv = priv = gtk_tool_item_group_get_instance_private (group);
priv->children = NULL;
......
......@@ -1786,7 +1786,6 @@ gtk_tree_view_init (GtkTreeView *tree_view)
priv = tree_view->priv = gtk_tree_view_get_instance_private (tree_view);
 
gtk_widget_set_can_focus (GTK_WIDGET (tree_view), TRUE);
gtk_widget_set_redraw_on_allocate (GTK_WIDGET (tree_view), FALSE);
 
priv->show_expanders = TRUE;
priv->draw_keyfocus = TRUE;
......
......@@ -501,7 +501,6 @@ gtk_viewport_init (GtkViewport *viewport)
widget = GTK_WIDGET (viewport);
gtk_widget_set_has_window (widget, TRUE);
gtk_widget_set_redraw_on_allocate (widget, FALSE);
priv->shadow_type = GTK_SHADOW_IN;
priv->view_window = NULL;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment