From af7dcdddac4526103268dd9247369aacef47a498 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Wed, 1 Jun 2022 17:47:29 +0100 Subject: [PATCH] desktop-shell: Map surfaces in map() The only caller of map() then manually sets is_mapped = true. Just do it in the function which makes you think that's what it would do. Signed-off-by: Daniel Stone --- desktop-shell/shell.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 73dbdce7..33bbfc16 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -2454,6 +2454,8 @@ map(struct desktop_shell *shell, struct shell_surface *shsurf, weston_view_set_output(shsurf->view, shsurf->output); } + weston_surface_map(surface); + if (!shell->locked) { wl_list_for_each(seat, &compositor->seat_list, link) activate(shell, shsurf->view, seat, @@ -2501,7 +2503,6 @@ desktop_surface_committed(struct weston_desktop_surface *desktop_surface, if (!weston_surface_is_mapped(surface)) { map(shell, shsurf, sx, sy); - weston_surface_map(surface); /* as we need to survive the weston_surface destruction we'll * need to take another reference */ if (shsurf->shell->win_close_animation_type == ANIMATION_FADE) {