fix DnD freeze: forward button events during active drag grab

When a Wayland drag is active (seat->drag), always forward button
events so wlroots can properly end the drag. Without this, the
release never reaches the drag grab, causing stuck drags and
assertion failures on client teardown.
This commit is contained in:
lkn 2026-06-23 17:29:39 +02:00
parent 311ccfbdd9
commit b90908da6a
1 changed files with 5 additions and 0 deletions

View File

@ -331,6 +331,11 @@ handle_pointer_button(struct wl_listener *listener, void *data)
wlr_seat_pointer_notify_button(wl_state.seat, ev->time_msec,
ev->button, ev->state);
wlr_seat_pointer_notify_frame(wl_state.seat);
} else if (wl_state.seat->drag) {
/* Active drag grab: always forward so wlroots can end the drag. */
wlr_seat_pointer_notify_button(wl_state.seat, ev->time_msec,
ev->button, ev->state);
wlr_seat_pointer_notify_frame(wl_state.seat);
}
}