Skip to content

Fix docked panel placement at display scales above 100% - #247

Merged
Perchik71 merged 1 commit into
Perchik71:masterfrom
frakkin64:fix-docking-dpi-frame-bounds
Oct 15, 2026
Merged

Perchik71 merged 1 commit into
Perchik71:masterfrom
frakkin64:fix-docking-dpi-frame-bounds

Conversation

@frakkin64

Copy link
Copy Markdown
Contributor

DWMWA_EXTENDED_FRAME_BOUNDS is always in physical pixels, while GetWindowRect/ClientToScreen/GetCursorPos are virtualized for a DPI-unaware process (the CK). The frame insets computed from the two were therefore wrong, so snapped panels, restored layouts and the maximize rescale landed in the wrong place. Convert the DWM bounds into the caller's coordinate space with PhysicalToLogicalPointForPerMonitorDPI.

DWMWA_EXTENDED_FRAME_BOUNDS is always in physical pixels, while
GetWindowRect/ClientToScreen/GetCursorPos are virtualized for a
DPI-unaware process (the CK). The frame insets computed from the two
were therefore wrong, so snapped panels, restored layouts and the
maximize rescale landed in the wrong place. Convert the DWM bounds into
the caller's coordinate space with PhysicalToLogicalPointForPerMonitorDPI.
@Perchik71
Perchik71 merged commit 8d01514 into Perchik71:master Oct 15, 2026
2 checks passed
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.

2 participants