Repository navigation
XCL window: window_pos setting; free the cursor while dragging the window - #176
Merged
Merged
Conversation
…lamped x,y The window was created with CW_USEDEFAULT for its position, so on a multi-monitor desktop Windows may place it on any monitor (observed: a 4-monitor setup, the window landed on the narrow portrait side monitor). window_pos (XCL_WINDOW_POS overrides): auto keeps the old behavior, center centers on the primary work area, x,y clamps into the nearest monitor work area. Test: window_position_modes covers all modes, the clamp, and the env override.
While the XCL window has the focus its cursor is clipped to the client centre (the mouse plays the right stick). WM_MOVE re-clipped it during a drag: the cursor teleported back to the (moving) centre mid-drag, breaking the drag. Track WM_ENTERSIZEMOVE/WM_EXITSIZEMOVE: release the clip for the whole drag/resize loop, restore it after. kbm tests pass (7).
This was referenced Nov 23, 2026
Collaborator
|
Merged (main 6da33fa). Checked on an RX 9070 (RDNA4) with the 22 PRs merged together on main eaa36b6: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.