XCL window: window_pos setting; free the cursor while dragging the window #173
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/176"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by ryosen0 on 2026-11-23T18:58:54Z.
Two related window fixes, both reproduced on a 4-monitor desktop (one portrait 440x1920).
1.
window_possetting (commit 1). The XCL window was created withCW_USEDEFAULTfor its position; Windows may place it on any monitor — observed landing on the portrait side monitor, mostly off-screen. Newwindow_posin xcl.toml (XCL_WINDOW_POSoverrides):"auto"(default, unchanged),"center"(primary work area),"x,y"(clamped into the nearest monitor's work area). Verified: with"center"the rect is (312,160)-(1608,919) on the primary 1920x1080.2. Cursor teleport while dragging the window (commit 2). While the window has the focus, kbm clips the cursor to the client centre (the mouse plays the right stick).
WM_MOVEre-clipped it during a title-bar drag: the cursor teleported back to the moving centre mid-drag and broke the drag. NowWM_ENTERSIZEMOVEreleases the clip for the whole drag/resize loop andWM_EXITSIZEMOVErestores it. Verified interactively: the window drags smoothly, the cursor stays hidden in the client area otherwise.Tests:
window_position_modes(all modes, clamp, env override), kbm suite 7 passed.Imported from ivall/xcl. Originally posted by ivall on 2026-11-23T21:09:09Z.
Merged (main
6da33fa). Checked on an RX 9070 (RDNA4) with the 22 PRs merged together on maineaa36b6:cargo build --workspace && cargo test --workspace -- --test-threads=4- 582 unit tests passed, 0 failed (20 ignored), the integration and e2e tests passed too; and the retail game still reaches its first menu (646 frames in 30 s, no device removal).