[gtk/present-toplevel-2: 59/71] window: Use new toplevel api to lower



commit 91eb075c4ffc8bd20c12214bc2210e0e3fb3738b
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Mar 4 16:49:51 2020 -0800

    window: Use new toplevel api to lower

 gtk/gtkwindow.c | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 43311d49d3..9791e49706 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -1318,16 +1318,7 @@ gtk_window_titlebar_action (GtkWindow      *window,
             _gtk_window_toggle_maximized (window);
     }
   else if (g_str_equal (action, "lower"))
-    {
-      int w, h;
-      GdkToplevelLayout *layout;
-
-      layout = gtk_window_compute_layout (window, &w, &h);
-      gdk_toplevel_layout_set_raise (layout, FALSE);
-      gdk_toplevel_layout_set_lower (layout, TRUE);
-      gdk_toplevel_present (GDK_TOPLEVEL (priv->surface), w, h, layout);
-      gdk_toplevel_layout_unref (layout);
-    }
+    gdk_toplevel_lower (GDK_TOPLEVEL (priv->surface));
   else if (g_str_equal (action, "minimize"))
     gdk_toplevel_minimize (GDK_TOPLEVEL (priv->surface));
   else if (g_str_equal (action, "menu"))
@@ -1406,8 +1397,6 @@ click_gesture_pressed_cb (GtkGestureClick *gesture,
       GdkToplevelLayout *layout;
 
       layout = gtk_window_compute_layout (window, &w, &h);
-      gdk_toplevel_layout_set_raise (layout, TRUE);
-      gdk_toplevel_layout_set_lower (layout, FALSE);
       gdk_toplevel_present (GDK_TOPLEVEL (priv->surface), w, y, layout);
       gdk_toplevel_layout_unref (layout);
     }
@@ -4942,7 +4931,6 @@ gtk_window_compute_layout (GtkWindow *window,
                                       priv->initial_fullscreen_monitor);
   gdk_toplevel_layout_set_modal (layout, priv->modal);
   gdk_toplevel_layout_set_type_hint (layout, priv->type_hint);
-  gdk_toplevel_layout_set_raise (layout, TRUE);
 
   return layout;
 }


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