[gtk/present-toplevel-2: 3/79] fixup: window - don't resize on titlebar click



commit 68ec7f289fb05bdc0b4ac212a92d10aa2a3d1521
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Mar 6 11:08:38 2020 -0800

    fixup: window - don't resize on titlebar click

 gtk/gtkwindow.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index c7c6faa64d..72417182d2 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -1405,10 +1405,12 @@ click_gesture_pressed_cb (GtkGestureClick *gesture,
       int w, h;
       GdkToplevelLayout *layout;
 
-      layout = gtk_window_compute_layout (window, &w, &h);
+      layout = gtk_window_compute_layout (window, NULL, NULL);
       gdk_toplevel_layout_set_raise (layout, TRUE);
       gdk_toplevel_layout_set_lower (layout, FALSE);
-      gdk_toplevel_present (GDK_TOPLEVEL (priv->surface), w, y, layout);
+      w = gdk_surface_get_width (priv->surface);
+      h = gdk_surface_get_height (priv->surface);
+      gdk_toplevel_present (GDK_TOPLEVEL (priv->surface), w, h, layout);
       gdk_toplevel_layout_unref (layout);
     }
 


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