x11: Stop using gdk_surface_new_temp

No need to roundtrip through the frontend to create
one of our own surfaces.
This commit is contained in:
Matthias Clasen 2020-10-07 21:01:31 -04:00
parent e602d67e59
commit 839baf2bef
3 changed files with 19 additions and 8 deletions

View File

@ -1441,10 +1441,11 @@ gdk_x11_display_open (const char *display_name)
gdk_event_init (display);
{
GdkRectangle rect = { -100, -100, 1, 1 };
display_x11->leader_gdk_surface = gdk_surface_new_temp (display, &rect);
}
display_x11->leader_gdk_surface =
_gdk_x11_display_create_surface (display,
GDK_SURFACE_TEMP,
NULL,
-100, -100, 1, 1);
(_gdk_x11_surface_get_toplevel (display_x11->leader_gdk_surface))->is_leader = TRUE;

View File

@ -1269,7 +1269,10 @@ create_drag_surface (GdkDisplay *display)
{
GdkSurface *surface;
surface = gdk_surface_new_temp (display, &(GdkRectangle) { 0, 0, 100, 100 });
surface = _gdk_x11_display_create_surface (display,
GDK_SURFACE_TEMP,
NULL,
0, 0, 100, 100);
return surface;
}
@ -1999,7 +2002,10 @@ _gdk_x11_surface_drag_begin (GdkSurface *surface,
display = gdk_surface_get_display (surface);
ipc_surface = gdk_surface_new_temp (display, &(GdkRectangle) { -99, -99, 1, 1 });
ipc_surface = _gdk_x11_display_create_surface (display,
GDK_SURFACE_TEMP,
NULL,
-99, -99, 1, 1);
drag = (GdkDrag *) g_object_new (GDK_TYPE_X11_DRAG,
"surface", ipc_surface,

View File

@ -4114,11 +4114,15 @@ 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, &rect);
mv_resize->moveresize_emulation_surface =
_gdk_x11_display_create_surface (mv_resize->display,
GDK_SURFACE_TEMP,
NULL,
-100, -100, 1, 1);
gdk_x11_surface_show (mv_resize->moveresize_emulation_surface, FALSE);
status = gdk_seat_grab (gdk_device_get_seat (mv_resize->device),