[gtk: 57/88] gtk/window: Don't go via GtkNative when presenting




commit 369b03a3d80760935d991828376c1dca7ac9a4a2
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Fri Dec 4 09:23:46 2020 +0100

    gtk/window: Don't go via GtkNative when presenting
    
    It'll only call directly back into GtkWindow's toplevel present handling
    code.

 gtk/gtkwindow.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 07c23b0761..4940f9f217 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -1873,17 +1873,6 @@ gtk_window_native_get_surface_transform (GtkNative *native,
 static void
 gtk_window_native_check_resize (GtkNative *native)
 {
-  GtkWidget *widget = GTK_WIDGET (native);
-  gint64 before G_GNUC_UNUSED;
-
-  before = GDK_PROFILER_CURRENT_TIME;
-
-  if (!_gtk_widget_get_alloc_needed (widget))
-    gtk_widget_ensure_allocate (widget);
-  else if (gtk_widget_get_visible (widget))
-    gtk_window_present_toplevel (GTK_WINDOW (native));
-
-  gdk_profiler_end_mark (before, "size allocation", "");
 }
 
 static void
@@ -3749,7 +3738,7 @@ gtk_window_show (GtkWidget *widget)
 
   gtk_widget_realize (widget);
 
-  gtk_native_check_resize (GTK_NATIVE (window));
+  gtk_window_present_toplevel (window);
 
   gtk_widget_map (widget);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]