[gtk/resizing-fixes: 2/3] wayland: bypass events for ::size-changed




commit c828989a167e2d4c51a39c7cf958c12e8495faac
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Aug 7 18:02:16 2020 -0400

    wayland: bypass events for ::size-changed
    
    This is a step towards getting rid of configure
    events altogether.

 gdk/wayland/gdksurface-wayland.c | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)
---
diff --git a/gdk/wayland/gdksurface-wayland.c b/gdk/wayland/gdksurface-wayland.c
index 742b992b2b..9444f46265 100644
--- a/gdk/wayland/gdksurface-wayland.c
+++ b/gdk/wayland/gdksurface-wayland.c
@@ -934,18 +934,13 @@ gdk_wayland_surface_resize (GdkSurface *surface,
                             int         height,
                             int         scale)
 {
+  GdkWaylandSurface *impl = GDK_WAYLAND_SURFACE (surface);
+
   gdk_wayland_surface_update_size (surface, width, height, scale);
   _gdk_surface_update_size (surface);
 
-  if (is_realized_shell_surface (surface))
-    {
-      GdkDisplay *display;
-      GdkEvent *event;
-
-      event = gdk_configure_event_new (surface, width, height);
-      display = gdk_surface_get_display (surface);
-      _gdk_wayland_display_deliver_event (display, event);
-    }
+  if (impl->mapped)
+    g_signal_emit_by_name (surface, "size-changed", width, height);
 }
 
 static void gdk_wayland_surface_show (GdkSurface *surface,


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