mirror of
https://github.com/labwc/labwc.git
synced 2026-04-06 07:15:40 -04:00
cursor: clean up cursor_process_button_{press,release}()
This should not change any behaviors.
This commit is contained in:
parent
0f62648d39
commit
df09678631
1 changed files with 7 additions and 12 deletions
|
|
@ -953,10 +953,6 @@ static void
|
|||
process_release_mousebinding(struct server *server,
|
||||
struct cursor_context *ctx, uint32_t button)
|
||||
{
|
||||
if (server->input_mode == LAB_INPUT_STATE_WINDOW_SWITCHER) {
|
||||
return;
|
||||
}
|
||||
|
||||
struct mousebind *mousebind;
|
||||
uint32_t modifiers = keyboard_get_all_modifiers(&server->seat);
|
||||
|
||||
|
|
@ -1022,10 +1018,6 @@ static bool
|
|||
process_press_mousebinding(struct server *server, struct cursor_context *ctx,
|
||||
uint32_t button)
|
||||
{
|
||||
if (server->input_mode == LAB_INPUT_STATE_WINDOW_SWITCHER) {
|
||||
return false;
|
||||
}
|
||||
|
||||
struct mousebind *mousebind;
|
||||
bool double_click = is_double_click(rc.doubleclick_time, button, ctx);
|
||||
bool consumed_by_frame_context = false;
|
||||
|
|
@ -1115,8 +1107,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.
|
||||
*/
|
||||
press_msec = 0;
|
||||
lab_set_add(&seat->bound_buttons, button);
|
||||
return false;
|
||||
goto consumed;
|
||||
}
|
||||
|
||||
if (server->input_mode != LAB_INPUT_STATE_PASSTHROUGH) {
|
||||
goto consumed;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -1148,8 +1143,7 @@ cursor_process_button_press(struct seat *seat, uint32_t button, uint32_t time_ms
|
|||
* Note: This does not work for XWayland clients
|
||||
*/
|
||||
wlr_seat_pointer_end_grab(seat->seat);
|
||||
lab_set_add(&seat->bound_buttons, button);
|
||||
return false;
|
||||
goto consumed;
|
||||
}
|
||||
|
||||
/* Bindings to the Frame context swallow mouse events if activated */
|
||||
|
|
@ -1161,6 +1155,7 @@ cursor_process_button_press(struct seat *seat, uint32_t button, uint32_t time_ms
|
|||
return true;
|
||||
}
|
||||
|
||||
consumed:
|
||||
lab_set_add(&seat->bound_buttons, button);
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue