use the right cursor after move and resize

Fixes https://codeberg.org/dwl/dwl/issues/1162

Co-authored-by: DreamMaoMao <2523610504@qq.com>
This commit is contained in:
Guido Cella
2026-09-13 19:06:54 +02:00
co-authored by DreamMaoMao
parent e8bf70d639
commit 8ad2c920db
+3 -2
View File
@@ -703,10 +703,11 @@ buttonpress(struct wl_listener *listener, void *data)
break; break;
case WL_POINTER_BUTTON_STATE_RELEASED: case WL_POINTER_BUTTON_STATE_RELEASED:
/* If you released any buttons, we exit interactive move/resize mode. */ /* If you released any buttons, we exit interactive move/resize mode. */
/* TODO: should reset to the pointer focus's current setcursor */
if (!locked && cursor_mode != CurNormal && cursor_mode != CurPressed) { if (!locked && cursor_mode != CurNormal && cursor_mode != CurPressed) {
wlr_cursor_set_xcursor(cursor, cursor_mgr, "default");
cursor_mode = CurNormal; cursor_mode = CurNormal;
/* Update the cursor */
wlr_seat_pointer_clear_focus(seat);
motionnotify(0, NULL, 0, 0, 0, 0);
/* Drop the window off on its new monitor */ /* Drop the window off on its new monitor */
selmon = xytomon(cursor->x, cursor->y); selmon = xytomon(cursor->x, cursor->y);
setmon(grabc, selmon, 0); setmon(grabc, selmon, 0);