Skip to content

Make --window turn fullscreen off again - #3163

Open
tomjn wants to merge 1 commit into
beyond-all-reason:masterfrom
tomjn:fix/window-cli-flag
Open

Make --window turn fullscreen off again#3163
tomjn wants to merge 1 commit into
beyond-all-reason:masterfrom
tomjn:fix/window-cli-flag

Conversation

@tomjn

@tomjn tomjn commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

--window has done nothing since April 2017 whenever the config said Fullscreen = 1. SetFullScreen works out the windowed case and then overwrites it on the next line.

d1eec3d rewrote a working if/else chain into two plain assignments and dropped the first result. This restores that chain's meaning: --window beats --fullscreen, either beats the config.

Found while working on macOS, where it is hard to miss: exclusive fullscreen forces a display mode change, so the desktop leaves its 2x scale and every other window's text goes tiny. The bug itself is not platform specific.

One thing worth a second opinion on. The result is written back to the config, so --window now persists Fullscreen = 0 into later runs. --fullscreen has always persisted Fullscreen = 1 the same way, so the two are symmetric, but it is a change from nine years of the flag doing nothing at all.

Tested by hand on macOS: with Fullscreen = 1 in springsettings.cfg, --window gives a decorated window and the log reads windowed::decorated.

SetFullScreen worked out the windowed case and then overwrote it on the next line, so --window did nothing whenever the config said Fullscreen = 1.

Introduced in d1eec3d (April 2017), which rewrote a working if/else chain into two assignments. This restores that chain's meaning: --window beats --fullscreen, either beats the config.
@sprunk

sprunk commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

The result is written back to the config, so --window now persists Fullscreen = 0 into later runs.

Perhaps the CLI tags should instead use the config overlay feature? That prevents it from being saved while still being readable elsewhere as if it was in the config (in case wupgets use that to tell if we're fullscreen):

	if (cliWindowed)
		configHandler->Set("Fullscreen", 0, true);
	else if (cliFullscreen)
		configHandler->Set("Fullscreen", 1, true);
		//                                  ^^^^ overlay

	fullScreen = configHandler->GetBool("Fullscreen");

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