cursor: send release event to CSD client before finishing window dragging

This fixes that, when a CSD window is dragged into below waybar and the cursor
button is released, the cursor focus is moved from the CSD window to waybar and
a release event is sent to waybar, not original CSD window.
This commit is contained in:
tokyo4j 2024-04-05 18:01:06 +09:00 committed by Consolatis
parent 5cc0757390
commit da9456881d

View file

@ -1033,14 +1033,15 @@ cursor_button_release(struct seat *seat, uint32_t button,
}
if (server->input_mode != LAB_INPUT_STATE_PASSTHROUGH) {
/* Exit interactive move/resize mode */
interactive_finish(server->grabbed_view);
if (pressed_surface) {
/* Ensure CSD clients see the release event */
wlr_seat_pointer_notify_button(seat->seat, time_msec,
button, button_state);
}
/* Exit interactive move/resize mode */
interactive_finish(server->grabbed_view);
return;
}