This commit is contained in:
Hiroaki Yamamoto 2025-11-28 14:44:16 +05:30 committed by GitHub
commit 10ade64345
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -920,10 +920,6 @@ static void
process_release_mousebinding(struct server *server, process_release_mousebinding(struct server *server,
struct cursor_context *ctx, uint32_t button) struct cursor_context *ctx, uint32_t button)
{ {
if (server->input_mode == LAB_INPUT_STATE_WINDOW_SWITCHER) {
return;
}
struct mousebind *mousebind; struct mousebind *mousebind;
uint32_t modifiers = keyboard_get_all_modifiers(&server->seat); uint32_t modifiers = keyboard_get_all_modifiers(&server->seat);
@ -989,10 +985,6 @@ static bool
process_press_mousebinding(struct server *server, struct cursor_context *ctx, process_press_mousebinding(struct server *server, struct cursor_context *ctx,
uint32_t button) uint32_t button)
{ {
if (server->input_mode == LAB_INPUT_STATE_WINDOW_SWITCHER) {
return false;
}
struct mousebind *mousebind; struct mousebind *mousebind;
bool double_click = is_double_click(rc.doubleclick_time, button, ctx); bool double_click = is_double_click(rc.doubleclick_time, button, ctx);
bool consumed_by_frame_context = false; bool consumed_by_frame_context = false;
@ -1082,8 +1074,11 @@ cursor_process_button_press(struct seat *seat, uint32_t button, uint32_t time_ms
* so subsequent release always closes menu or selects menu item. * so subsequent release always closes menu or selects menu item.
*/ */
press_msec = 0; press_msec = 0;
lab_set_add(&seat->bound_buttons, button); goto consumed;
return false; }
if (server->input_mode != LAB_INPUT_STATE_PASSTHROUGH) {
goto consumed;
} }
/* /*
@ -1115,8 +1110,7 @@ cursor_process_button_press(struct seat *seat, uint32_t button, uint32_t time_ms
* Note: This does not work for XWayland clients * Note: This does not work for XWayland clients
*/ */
wlr_seat_pointer_end_grab(seat->seat); wlr_seat_pointer_end_grab(seat->seat);
lab_set_add(&seat->bound_buttons, button); goto consumed;
return false;
} }
/* Bindings to the Frame context swallow mouse events if activated */ /* Bindings to the Frame context swallow mouse events if activated */
@ -1128,6 +1122,7 @@ cursor_process_button_press(struct seat *seat, uint32_t button, uint32_t time_ms
return true; return true;
} }
consumed:
lab_set_add(&seat->bound_buttons, button); lab_set_add(&seat->bound_buttons, button);
return false; return false;
} }