diff options
author | Vincent Vanlaer <vincent.vanlaer@skynet.be> | 2018-02-06 12:26:54 +0100 |
---|---|---|
committer | Vincent Vanlaer <vincent.vanlaer@skynet.be> | 2018-02-06 12:36:04 +0100 |
commit | 7e3bb39d4994767edb972fe3039c7dd317fb63b0 (patch) | |
tree | a4c998b38b783ebbb4e3bea27f5d4a020a3055a6 /rootston | |
parent | b10269e513a0bf29059a7203aa8e3ccac10f0af4 (diff) |
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.
Diffstat (limited to 'rootston')
-rw-r--r-- | rootston/cursor.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/rootston/cursor.c b/rootston/cursor.c index d8753f44..59996d30 100644 --- a/rootston/cursor.c +++ b/rootston/cursor.c @@ -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, |