* Finishes cursor button release. The return value indicates if an interactive
* move/resize had been finished. Should be called after notifying a client.
*/
-bool cursor_finish_button_release(struct seat *seat);
+bool cursor_finish_button_release(struct seat *seat, uint32_t button);
void cursor_init(struct seat *seat);
void cursor_reload(struct seat *seat);
actions_run(ctx->view, server, &mousebind->actions, ctx);
}
}
- /*
- * Clear "pressed" status for all bindings of this mouse button,
- * regardless of whether handled or not
- */
- wl_list_for_each(mousebind, &rc.mousebinds, link) {
- if (mousebind->button == button) {
- mousebind->pressed_in_context = false;
- }
- }
+
return consumed_by_frame_context;
}
}
bool
-cursor_finish_button_release(struct seat *seat)
+cursor_finish_button_release(struct seat *seat, uint32_t button)
{
struct server *server = seat->server;
+ /* Clear "pressed" status for all bindings of this mouse button */
+ struct mousebind *mousebind;
+ wl_list_for_each(mousebind, &rc.mousebinds, link) {
+ if (mousebind->button == button) {
+ mousebind->pressed_in_context = false;
+ }
+ }
+
if (server->input_mode == LAB_INPUT_STATE_MOVE
|| server->input_mode == LAB_INPUT_STATE_RESIZE) {
if (resize_outlines_enabled(server->grabbed_view)) {
wlr_seat_pointer_notify_button(seat->seat, event->time_msec,
event->button, event->state);
}
- cursor_finish_button_release(seat);
+ cursor_finish_button_release(seat, event->button);
break;
}
}
if (notify) {
wlr_seat_pointer_notify_button(seat->seat, time_msec, button, state);
}
- cursor_finish_button_release(seat);
+ cursor_finish_button_release(seat, button);
break;
}
}
wlr_tablet_v2_tablet_tool_notify_up(tool->tool_v2);
}
- bool exit_interactive = cursor_finish_button_release(tool->seat);
+ bool exit_interactive = cursor_finish_button_release(tool->seat, BTN_LEFT);
if (exit_interactive && surface && tool->tool_v2->focused_surface) {
/*
* Re-enter the surface after a resize/move to ensure