diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2017-01-19 16:07:13 +0100 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2017-01-19 16:18:54 +0100 |
commit | 6beb0b91c91dd4a018b0fe2c39f5687a00938821 (patch) | |
tree | 1c8c9157e71b01bac765653dde4e46ba84b7975e | |
parent | 94ae322f65dc01ac545652baf2bdef93345af7b2 (diff) | |
download | gtk+-6beb0b91c91dd4a018b0fe2c39f5687a00938821.tar.gz |
wayland: Push NULL buffer when hiding a GdkWindow
This is how windows are meant to be hidden as per the wayland
protocol, there's no need to destroy the xdg_surface and other
interfaces.
Also, rename gdk_wayland_window_hide_surface() to clear_surface(),
as that's what it does.
https://bugzilla.gnome.org/show_bug.cgi?id=773686
-rw-r--r-- | gdk/wayland/gdkwindow-wayland.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c index 674dac5b68..ef7d61ab0a 100644 --- a/gdk/wayland/gdkwindow-wayland.c +++ b/gdk/wayland/gdkwindow-wayland.c @@ -2439,7 +2439,7 @@ unmap_popups_for_window (GdkWindow *window) } static void -gdk_wayland_window_hide_surface (GdkWindow *window) +gdk_wayland_window_clear_surface (GdkWindow *window) { GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (gdk_window_get_display (window)); GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl); @@ -2534,7 +2534,10 @@ gdk_wayland_window_hide_surface (GdkWindow *window) static void gdk_wayland_window_hide (GdkWindow *window) { - gdk_wayland_window_hide_surface (window); + GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl); + + wl_surface_attach (impl->display_server.wl_surface, NULL, 0, 0); + wl_surface_commit (impl->display_server.wl_surface); _gdk_window_clear_update_area (window); } @@ -2548,7 +2551,7 @@ gdk_window_wayland_withdraw (GdkWindow *window) g_assert (!GDK_WINDOW_IS_MAPPED (window)); - gdk_wayland_window_hide_surface (window); + gdk_wayland_window_clear_surface (window); } } @@ -2835,7 +2838,7 @@ gdk_wayland_window_destroy (GdkWindow *window, */ g_return_if_fail (!foreign_destroy); - gdk_wayland_window_hide_surface (window); + gdk_wayland_window_clear_surface (window); drop_cairo_surfaces (window); } |