Skip to content

fix: Fixed mouse locking interference bug#517

Draft
Benjas333 wants to merge 2 commits intoshinyflvre:mainfrom
Benjas333:clipCursor
Draft

fix: Fixed mouse locking interference bug#517
Benjas333 wants to merge 2 commits intoshinyflvre:mainfrom
Benjas333:clipCursor

Conversation

@Benjas333
Copy link
Copy Markdown

Fixed mouse locking interference bug #369

There's probably a better solution, but this one works (I tried so many that didn't, and I'm exhausted).

Explanation

Apparently, functions related to modifying the window (like SetWindowPos and MoveWindow) reset the actual ClipCursor to its default value. So this fix saves the ClipCursor value before moving/modifying the window, and then sets the ClipCursor to its previous value.

@Benjas333
Copy link
Copy Markdown
Author

Benjas333 commented Mar 16, 2026

Oh wait. I think the problem is using MoveWindow.

MoveWindow sends the WM_WINDOWPOSCHANGING, WM_WINDOWPOSCHANGED, WM_MOVE, WM_SIZE, and WM_NCCALCSIZE messages to the window.

It's basically a wrapper over SetWindowPos. I'll try to refactor the MoveWindow calls to SetWindowPos, applying the flags to see if the ClipCursor backup is not required at all.

@Benjas333
Copy link
Copy Markdown
Author

Benjas333 commented Mar 16, 2026

Didn't work. I'll keep the ClipCursor backup. But it's not ready; there's still an edge case with a variation of the bug.

@Benjas333 Benjas333 marked this pull request as draft March 19, 2026 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant