[gtk/wip/matthiasc/popup4: 71/76] x11: Stop using gdk_surface_new_temp



commit 407d6a1cca41efd2e43b0a473e92a37fac619884
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Apr 20 04:31:27 2019 +0000

    x11: Stop using gdk_surface_new_temp
    
    We can just as well use gdk_surface_new_popup.

 gdk/x11/gdkdisplay-x11.c | 6 +++++-
 gdk/x11/gdksurface-x11.c | 3 ++-
 2 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
index 003881359d..e37447e32f 100644
--- a/gdk/x11/gdkdisplay-x11.c
+++ b/gdk/x11/gdkdisplay-x11.c
@@ -1484,7 +1484,11 @@ gdk_x11_display_open (const gchar *display_name)
 
   gdk_event_init (display);
 
-  display_x11->leader_gdk_surface = gdk_surface_new_temp (display);
+  {
+    GdkRectangle rect = { -100, -100, 1, 1 };
+    display_x11->leader_gdk_surface = gdk_surface_new_popup (display, &rect);
+  }
+
   (_gdk_x11_surface_get_toplevel (display_x11->leader_gdk_surface))->is_leader = TRUE;
 
   display_x11->leader_window = GDK_SURFACE_XID (display_x11->leader_gdk_surface);
diff --git a/gdk/x11/gdksurface-x11.c b/gdk/x11/gdksurface-x11.c
index 58e7f2298e..7b7a7ff427 100644
--- a/gdk/x11/gdksurface-x11.c
+++ b/gdk/x11/gdksurface-x11.c
@@ -4101,10 +4101,11 @@ create_moveresize_surface (MoveResizeData *mv_resize,
                           guint32         timestamp)
 {
   GdkGrabStatus status;
+  GdkRectangle rect = { -100, -100, 1, 1 };
 
   g_assert (mv_resize->moveresize_emulation_surface == NULL);
 
-  mv_resize->moveresize_emulation_surface = gdk_surface_new_temp (mv_resize->display);
+  mv_resize->moveresize_emulation_surface = gdk_surface_new_popup (mv_resize->display, &rect);
   gdk_surface_show (mv_resize->moveresize_emulation_surface);
 
   status = gdk_seat_grab (gdk_device_get_seat (mv_resize->device),


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