From 7a19184e5ecba88c330f04150f1d9b0896c959f9 Mon Sep 17 00:00:00 2001 From: Consolatis <35009135+Consolatis@users.noreply.github.com> Date: Sun, 6 Aug 2023 12:19:58 +0200 Subject: [PATCH] src/cursor.c: end popup grab on desktop click Fixes #949 --- src/cursor.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/cursor.c b/src/cursor.c index 90a67cf5..cfcce678 100644 --- a/src/cursor.c +++ b/src/cursor.c @@ -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);