Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@rcoreilly
Copy link
Member

@rcoreilly rcoreilly commented Dec 9, 2024

A last minute change in PR #1341 ended up overriding the effects of Stage.Screen! This fixes that issue and documents the new logic:

// Screen specifies the screen number on which a new window is opened
// by default on desktop platforms. The default behavior (Screen = -1)
// will open the first window on screen 0 (default primary screen) and
// any subsequent windows will open on the same screen as the currently
// active window. In any case, the automatically saved last position for
// a window (by window title) always has the final say if it exists.
// Use [TheApp].ScreenByName("name").ScreenNumber to get the number by name.

This is implemented by the targetScreen method, used consistently now.

Also added WindowGeometryDisabled flag to allow testing of code like this, without interference from saved prefs.

@kkoreilly I left demo with the testing code so you can give it a try -- be sure to remove before merging!

@kkoreilly kkoreilly changed the title Stage.Screen defaults to -1, is only used when set (0 or higher) Stage.Screen defaults to -1, is only used when set (0 or higher); other screen fixes Dec 10, 2024
@kkoreilly kkoreilly merged commit 8b32ae0 into main Dec 10, 2024
1 check passed
@kkoreilly kkoreilly deleted the defscreen branch December 10, 2024 05:51
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.

3 participants