diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index 32d31a5ee5..1371b48834 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -1901,7 +1901,16 @@ gtk_window_native_get_surface_transform (GtkNative *native, static void gtk_window_native_check_resize (GtkNative *native) { - gtk_window_check_resize (GTK_WINDOW (native)); + GtkWidget *widget = GTK_WIDGET (native); + gint64 before = g_get_monotonic_time (); + + if (!_gtk_widget_get_alloc_needed (widget)) + gtk_widget_ensure_allocate (widget); + else if (gtk_widget_get_visible (widget)) + gtk_window_move_resize (GTK_WINDOW (native)); + + if (GDK_PROFILER_IS_RUNNING) + gdk_profiler_end_mark (before, "size allocation", ""); } static void @@ -3818,7 +3827,7 @@ gtk_window_show (GtkWidget *widget) gtk_widget_realize (widget); - gtk_window_check_resize (window); + gtk_native_check_resize (GTK_NATIVE (window)); gtk_widget_map (widget); @@ -4882,21 +4891,6 @@ gtk_window_key_released (GtkWidget *widget, return FALSE; } -void -gtk_window_check_resize (GtkWindow *self) -{ - GtkWidget *widget = GTK_WIDGET (self); - gint64 before = g_get_monotonic_time (); - - if (!_gtk_widget_get_alloc_needed (widget)) - gtk_widget_ensure_allocate (widget); - else if (gtk_widget_get_visible (widget)) - gtk_window_move_resize (self); - - if (GDK_PROFILER_IS_RUNNING) - gdk_profiler_end_mark (before, "size allocation", ""); -} - static gboolean gtk_window_focus (GtkWidget *widget, GtkDirectionType direction) diff --git a/gtk/gtkwindowprivate.h b/gtk/gtkwindowprivate.h index 4918129d25..ac3fb9085d 100644 --- a/gtk/gtkwindowprivate.h +++ b/gtk/gtkwindowprivate.h @@ -51,7 +51,6 @@ void _gtk_window_set_allocation (GtkWindow *window, int width, int height, GtkAllocation *allocation_out); -void gtk_window_check_resize (GtkWindow *self); typedef void (*GtkWindowKeysForeachFunc) (GtkWindow *window, guint keyval,