]> git.mdlowis.com Git - proto/labwc.git/commitdiff
src/cursor.c: end popup grab on desktop click
authorConsolatis <35009135+Consolatis@users.noreply.github.com>
Sun, 6 Aug 2023 10:19:58 +0000 (12:19 +0200)
committerConsolatis <35009135+Consolatis@users.noreply.github.com>
Mon, 7 Aug 2023 07:59:30 +0000 (09:59 +0200)
Fixes #949

src/cursor.c

index 90a67cf56b31c5d6ae2d953660cb9d900cfee3bf..cfcce67819a0b5c808a4ecc95c4f7fafa2daf4ee 100644 (file)
@@ -923,6 +923,12 @@ cursor_button_press(struct seat *seat, struct wlr_pointer_button_event *event)
                }
        }
 
+       if (ctx.type == LAB_SSD_ROOT && wlr_seat_pointer_has_grab(seat->seat)) {
+               /* Let a click on the desktop cancel an active popup grab */
+               wlr_seat_pointer_end_grab(seat->seat);
+               return;
+       }
+
        /* Bindings to the Frame context swallow mouse events if activated */
        bool consumed_by_frame_context =
                handle_press_mousebinding(server, &ctx, event->button, resize_edges);