Skip to content

Fix window placement on filter changes - #66

Merged
desertkun merged 3 commits into
mainfrom
fix/scaler-window-resize
Aug 6, 2026
Merged

Fix window placement on filter changes#66
desertkun merged 3 commits into
mainfrom
fix/scaler-window-resize

Conversation

@morozov

@morozov morozov commented Aug 6, 2026

Copy link
Copy Markdown
Member

Changing the graphics filter displaced the emulator window instead of leaving it where the user put it.

Three behaviors are fixed:

  • The window drifted sideways a little further on each filter change, eventually walking off the edge of the screen.
  • A large enough filter left the window hanging past the right or bottom edge of the visible screen area.
  • Filters that render at the same scale, such as TV 3x and PAL TV 3x, resized the window even though the size did not change, discarding a window the user had resized by hand.

The window now keeps one position across every filter, stays within the visible screen area, and is left untouched when the filter does not change its size.

morozov added 3 commits August 5, 2026 17:00
Centring the new frame on the old one drifts the window sideways
whenever the requested size is not the size AppKit grants, so one
position is now shared across every filter.
A scaler large enough to widen the window past the screen edge left
it hanging there, since constrainFrameRect: guarantees only that the
title bar stays reachable.
Filters sharing a scaling factor, such as TV 3x and PAL TV 3x, ask
for the same window size, and any manual zoom survives switching
between them.
@desertkun
desertkun merged commit 2a8006a into main Aug 6, 2026
2 checks passed
@desertkun
desertkun deleted the fix/scaler-window-resize branch August 6, 2026 22:34
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