Fix #571 - on windows, mouse remains visible in screensaver#587
Merged
Conversation
scottdraves
added a commit
that referenced
this pull request
Apr 27, 2026
Fixes a crash on Settings -> Close (preserve_AR=true) and the regression where the resize cursor stopped appearing on the window borders. Resize cursor: WM_SETCURSOR's non-fullscreen branch was breaking out of the switch (added in #587 for fullscreen cursor hiding), which falls through to "return 0" — telling Windows not to change the cursor. Defer to DefWindowProc instead so it picks IDC_SIZEWE/etc. based on the WM_NCHITTEST result. Drag-resize itself was working; just invisible. Crash on close: SnapWindowTo16By9IfNeeded ran synchronously inside the ImGui Close button handler. SetWindowPos -> WM_SIZE -> ResizeSwapChain released RendererDX11's RTV while RenderIfNeeded still held the raw pointer; the trailing OMSetRenderTargets dereferenced it. Now CloseDialog posts a WM_APP message via PostMessageW and CDisplayDX11::WndProc runs the snap from the message pump, after the render frame has returned. CreateDisplayWindow: the work-area clamp now scales width and height uniformly so the 16:9 design ratio is preserved when the requested size doesn't fit. Independent per-axis shrinking previously produced ~1898x964 on a 1080p monitor at 150% DPI, which is what triggered the close-time snap (and thus the crash). Also enforce 16:9 on programmatic resizes (Aero snap, etc.) by posting the deferred-snap message from WM_SIZE when preserve_AR is on. Added an early-return to SnapWindowTo16By9IfNeeded so the handler is idempotent and won't feedback-loop on its own SetWindowPos. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
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.
No description provided.