Skip to content

Commit 6f02ae5

Browse files
author
csaba
committed
Fix for [fe932e457]: Scaling on aqua gets unexpectedly reset.
1 parent 4cfe8eb commit 6f02ae5

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

changes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ to the userbase.
1818
# Bug fixes
1919
- [tk inactive returns a negative value on Windows for long inactivity](https://core.tcl-lang.org/tk/tktview/3cb7c4)
2020
- [nanosvg possible zero malloc on file error](https://github.com/memononen/nanosvg/pull/291)
21+
- [Scaling on aqua gets unexpectedly reset](https://core.tcl-lang.org/tk/tktview/fe932e)
2122

2223
Release Tk 9.0.4 arises from the check-in with tag `core-9-0-4`.
2324

macosx/tkMacOSXXStubs.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,10 @@ TkMacOSXDisplayChanged(
9494
DefaultDepthOfScreen(screen) = NSBitsPerPixelFromDepth([s depth]);
9595
WidthOfScreen(screen) = bounds.size.width;
9696
HeightOfScreen(screen) = bounds.size.height;
97-
WidthMMOfScreen(screen) = (bounds.size.width * 381 + 720) / 1440; /* = 3/4 * 254/720 */
98-
HeightMMOfScreen(screen) = (bounds.size.height * 381 + 720) / 1440; /* = 3/4 * 254/720 */
97+
if (WidthMMOfScreen(screen) == 0) {
98+
WidthMMOfScreen(screen) = (bounds.size.width * 381 + 720) / 1440; /* = 3/4 * 254/720 */
99+
HeightMMOfScreen(screen) = (bounds.size.height * 381 + 720) / 1440; /* = 3/4 * 254/720 */
100+
}
99101

100102
for (s in nsScreens) {
101103
maxBounds = NSUnionRect(maxBounds, [s visibleFrame]);

0 commit comments

Comments
 (0)