diff --git a/src/wayland/meta-window-wayland.c b/src/wayland/meta-window-wayland.c index 46ee78095..c71cc9a0b 100644 --- a/src/wayland/meta-window-wayland.c +++ b/src/wayland/meta-window-wayland.c @@ -57,6 +57,8 @@ struct _MetaWindowWayland int last_sent_y; int last_sent_width; int last_sent_height; + + gboolean has_been_shown; }; struct _MetaWindowWaylandClass @@ -538,6 +540,19 @@ appears_focused_changed (GObject *object, surface_state_changed (window); } +static void +on_window_shown (MetaWindow *window) +{ + MetaWindowWayland *wl_window = META_WINDOW_WAYLAND (window); + gboolean has_been_shown; + + has_been_shown = wl_window->has_been_shown; + wl_window->has_been_shown = TRUE; + + if (!has_been_shown) + meta_compositor_sync_updates_frozen (window->display->compositor, window); +} + static void meta_window_wayland_init (MetaWindowWayland *wl_window) { @@ -547,6 +562,8 @@ meta_window_wayland_init (MetaWindowWayland *wl_window) g_signal_connect (window, "notify::appears-focused", G_CALLBACK (appears_focused_changed), NULL); + g_signal_connect (window, "shown", + G_CALLBACK (on_window_shown), NULL); } static void @@ -576,7 +593,9 @@ meta_window_wayland_is_stackable (MetaWindow *window) static gboolean meta_window_wayland_are_updates_frozen (MetaWindow *window) { - return FALSE; + MetaWindowWayland *wl_window = META_WINDOW_WAYLAND (window); + + return !wl_window->has_been_shown; } static void