From cb31e7ce5582664ff11159e0198c64408f80e9e4 Mon Sep 17 00:00:00 2001 From: Johan Malm Date: Fri, 4 Aug 2023 22:04:42 +0100 Subject: [PATCH] xwayland: fix client request-unmap bug Remove foreign-toplevel handle when a client sends a request-unmap to a minimized (therefore unmapped) view. --- src/xwayland.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/xwayland.c b/src/xwayland.c index 044a1da2..4c600e48 100644 --- a/src/xwayland.c +++ b/src/xwayland.c @@ -492,7 +492,7 @@ static void xwayland_view_unmap(struct view *view, bool client_request) { if (!view->mapped) { - return; + goto out; } view->mapped = false; wl_list_remove(&view->commit.link); @@ -504,6 +504,7 @@ xwayland_view_unmap(struct view *view, bool client_request) * than just minimized), destroy the foreign toplevel handle so * the unmapped view doesn't show up in panels and the like. */ +out: if (client_request && view->toplevel.handle) { wlr_foreign_toplevel_handle_v1_destroy(view->toplevel.handle); view->toplevel.handle = NULL;