From d148f26658bd6af8066c8269585c02959943c69b Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 15 Jul 2018 15:12:14 -0400 Subject: Drop gdk_surface_withdraw 'withdrawn' is an X11-centric concept, and the function can just as well be replaced by gdk_surface_hide. --- gdk/x11/gdksurface-x11.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'gdk/x11') diff --git a/gdk/x11/gdksurface-x11.c b/gdk/x11/gdksurface-x11.c index f04f74d486..29b6dae9f7 100644 --- a/gdk/x11/gdksurface-x11.c +++ b/gdk/x11/gdksurface-x11.c @@ -1284,6 +1284,23 @@ gdk_surface_x11_show (GdkSurface *surface, gboolean already_mapped) gdk_x11_surface_apply_fullscreen_mode (surface); } +static void +gdk_surface_x11_withdraw (GdkSurface *surface) +{ + if (!surface->destroyed) + { + if (GDK_SURFACE_IS_MAPPED (surface)) + gdk_synthesize_surface_state (surface, + 0, + GDK_SURFACE_STATE_WITHDRAWN); + + g_assert (!GDK_SURFACE_IS_MAPPED (surface)); + + XWithdrawWindow (GDK_SURFACE_XDISPLAY (surface), + GDK_SURFACE_XID (surface), 0); + } +} + static void gdk_surface_x11_hide (GdkSurface *surface) { @@ -1299,7 +1316,7 @@ gdk_surface_x11_hide (GdkSurface *surface) { case GDK_SURFACE_TOPLEVEL: case GDK_SURFACE_TEMP: /* ? */ - gdk_surface_withdraw (surface); + gdk_surface_x11_withdraw (surface); return; case GDK_SURFACE_CHILD: @@ -1313,23 +1330,6 @@ gdk_surface_x11_hide (GdkSurface *surface) GDK_SURFACE_XID (surface)); } -static void -gdk_surface_x11_withdraw (GdkSurface *surface) -{ - if (!surface->destroyed) - { - if (GDK_SURFACE_IS_MAPPED (surface)) - gdk_synthesize_surface_state (surface, - 0, - GDK_SURFACE_STATE_WITHDRAWN); - - g_assert (!GDK_SURFACE_IS_MAPPED (surface)); - - XWithdrawWindow (GDK_SURFACE_XDISPLAY (surface), - GDK_SURFACE_XID (surface), 0); - } -} - static inline void surface_x11_move (GdkSurface *surface, gint x, -- cgit v1.2.1