]> git.mdlowis.com Git - proto/labwc.git/commitdiff
xwayland: fix client request-unmap bug
authorJohan Malm <jgm323@gmail.com>
Fri, 4 Aug 2023 21:04:42 +0000 (22:04 +0100)
committerJohan Malm <johanmalm@users.noreply.github.com>
Sat, 5 Aug 2023 14:25:00 +0000 (15:25 +0100)
Remove foreign-toplevel handle when a client sends a request-unmap to a
minimized (therefore unmapped) view.

src/xwayland.c

index d456ac52827651e071a41517eab38757d510e743..46e411b66c57de0f1d1360d61e0c237fd7a892e0 100644 (file)
@@ -489,7 +489,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);
@@ -501,6 +501,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;