mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-02 03:45:58 +01:00
Always notify seat on button press
When the cursor is not over a view, wlr_seat_pointer_notify_button is not called. However, this function does the bookkeeping of the pointer state with regards to the number of pressed buttons. Because this function also sends updates to the focused view, it has been moved down, after the focus has been updated.
This commit is contained in:
parent
b10269e513
commit
7e3bb39d49
1 changed files with 4 additions and 6 deletions
|
@ -261,12 +261,6 @@ static void roots_cursor_press_button(struct roots_cursor *cursor,
|
|||
}
|
||||
}
|
||||
|
||||
if (view && surface) {
|
||||
if (!is_touch) {
|
||||
wlr_seat_pointer_notify_button(seat->seat, time, button, state);
|
||||
}
|
||||
}
|
||||
|
||||
switch (state) {
|
||||
case WLR_BUTTON_RELEASED:
|
||||
if (!is_touch) {
|
||||
|
@ -277,6 +271,10 @@ static void roots_cursor_press_button(struct roots_cursor *cursor,
|
|||
roots_seat_set_focus(seat, view);
|
||||
break;
|
||||
}
|
||||
|
||||
if (!is_touch) {
|
||||
wlr_seat_pointer_notify_button(seat->seat, time, button, state);
|
||||
}
|
||||
}
|
||||
|
||||
void roots_cursor_handle_motion(struct roots_cursor *cursor,
|
||||
|
|
Loading…
Reference in a new issue