From 5e07a31d2bfd05ba53313b76beaa2f70fa990cde Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 2 Nov 2016 06:51:33 +0100 Subject: [PATCH] gtk: Call gtk_widget_set_has_window() on every widget Even if we just set it to the value it already had. --- gtk/gtkcolorplane.c | 1 + gtk/gtkiconview.c | 1 + gtk/gtkmenushell.c | 2 ++ gtk/gtktextview.c | 1 + gtk/gtktreeview.c | 2 ++ 5 files changed, 7 insertions(+) diff --git a/gtk/gtkcolorplane.c b/gtk/gtkcolorplane.c index cfb9a5983b..8aeab640d1 100644 --- a/gtk/gtkcolorplane.c +++ b/gtk/gtkcolorplane.c @@ -396,6 +396,7 @@ gtk_color_plane_init (GtkColorPlane *plane) plane->priv = gtk_color_plane_get_instance_private (plane); + gtk_widget_set_has_window (GTK_WIDGET (plane), TRUE); gtk_widget_set_can_focus (GTK_WIDGET (plane), TRUE); gtk_widget_set_events (GTK_WIDGET (plane), GDK_KEY_PRESS_MASK | GDK_TOUCH_MASK diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c index b8e7f9845d..b22cc39b87 100644 --- a/gtk/gtkiconview.c +++ b/gtk/gtkiconview.c @@ -951,6 +951,7 @@ gtk_icon_view_init (GtkIconView *icon_view) icon_view->priv->pixbuf_cell = NULL; icon_view->priv->tooltip_column = -1; + gtk_widget_set_has_window (GTK_WIDGET (icon_view), TRUE); gtk_widget_set_can_focus (GTK_WIDGET (icon_view), TRUE); icon_view->priv->item_orientation = GTK_ORIENTATION_VERTICAL; diff --git a/gtk/gtkmenushell.c b/gtk/gtkmenushell.c index 5ff12d322a..a74bfe2bad 100644 --- a/gtk/gtkmenushell.c +++ b/gtk/gtkmenushell.c @@ -433,6 +433,8 @@ gtk_menu_shell_init (GtkMenuShell *menu_shell) { menu_shell->priv = gtk_menu_shell_get_instance_private (menu_shell); menu_shell->priv->take_focus = TRUE; + + gtk_widget_set_has_window (GTK_WIDGET (menu_shell), TRUE); } static void diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index 65354007e3..bbbfeddc96 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -1658,6 +1658,7 @@ gtk_text_view_init (GtkTextView *text_view) text_view->priv = gtk_text_view_get_instance_private (text_view); priv = text_view->priv; + gtk_widget_set_has_window (widget, TRUE); gtk_widget_set_can_focus (widget, TRUE); context = gtk_widget_get_style_context (GTK_WIDGET (text_view)); diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c index 5a6ce2250d..0887f5f9ef 100644 --- a/gtk/gtktreeview.c +++ b/gtk/gtktreeview.c @@ -1788,6 +1788,8 @@ gtk_tree_view_init (GtkTreeView *tree_view) priv->event_last_x = -10000; priv->event_last_y = -10000; + gtk_widget_set_has_window (GTK_WIDGET (tree_view), TRUE); + gtk_tree_view_do_set_vadjustment (tree_view, NULL); gtk_tree_view_do_set_hadjustment (tree_view, NULL);