[gtk/wip/matthiasc/popup5: 61/108] x11: Stop using gdk_surface_new_temp
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/matthiasc/popup5: 61/108] x11: Stop using gdk_surface_new_temp
- Date: Sun, 19 May 2019 20:57:29 +0000 (UTC)
commit 2d93db9a41dd693b2c3b43e20b6b6bbc3123b005
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 178695686b..1ae6d1813b 100644
--- a/gdk/x11/gdkdisplay-x11.c
+++ b/gdk/x11/gdkdisplay-x11.c
@@ -1487,7 +1487,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 8c5582f2ab..abc8f5045b 100644
--- a/gdk/x11/gdksurface-x11.c
+++ b/gdk/x11/gdksurface-x11.c
@@ -4125,10 +4125,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]