From 55df74a1026b61436619fa9dae778b5a1a7f4f27 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 20 Oct 2017 14:43:11 +0200 Subject: [PATCH] window: Remove dead code GtkWindow never has a parent widget, so we never need to create a child window for it. --- gtk/gtkwindow.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index 9ad57c6130..64d9304676 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -6744,21 +6744,6 @@ gtk_window_realize (GtkWidget *widget) _gtk_widget_get_allocation (widget, &allocation); - if (gtk_widget_get_parent_window (widget)) - { - gdk_window = gdk_window_new_child (gtk_widget_get_parent_window (widget), - GDK_ALL_EVENTS_MASK, - &allocation); - gtk_widget_set_window (widget, gdk_window); - gtk_widget_register_window (widget, gdk_window); - gtk_widget_set_realized (widget, TRUE); - - priv->renderer = gsk_renderer_new_for_window (gdk_window); - gsk_renderer_set_scale_factor (priv->renderer, gtk_widget_get_scale_factor (widget)); - - return; - } - /* ensure widget tree is properly size allocated */ if (allocation.x == -1 && allocation.y == -1 &&