Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alt-Enter to make OpenTTD fullscreen desyncs actual fullscreen state from toggle in Game Options #8784

Closed
James103 opened this issue Mar 1, 2021 · 2 comments
Labels
bug
Milestone

Comments

@James103
Copy link
Contributor

@James103 James103 commented Mar 1, 2021

Version of OpenTTD

OpenTTD 1.11.0-beta2 on Windows 10
Started with openttd -v win32-opengl -b 40bpp-anim (autodetected defaults with my setup)

Expected result

When you use Alt-Enter to make OpenTTD full-screen while the Game Options window is open, the fullscreen toggle is visually pressed inside said window immediately once full-screen mode is enabled.

Actual result

When you use Alt-Enter to make OpenTTD full-screen while the Game Options window is open, the fullscreen toggle gets visually desynced from the actual fullscreen state, until you reopen the Game Settings window.

Steps to reproduce

  1. Start OpenTTD in windowed mode with the given settings.
  2. Open Game Options.
  3. Alt-Enter to make OpenTTD fullscreen.
  4. Notice that OpenTTD is fullscreen, but the fullscreen toggle is not on.
  5. Close and re-open Game Options.
  6. Notice that the fullscreen toggle is now on, as expected when OpenTTD is fullscreen.
  7. Alt-Enter to exit fullscreen mode for OpenTTD.
  8. Notice that OpenTTD is windowed, but the fullscreen toggle is still on.
  9. Close and re-open Game Options.
  10. Notice that the fullscreen toggle is now off, as expected when OpenTTD is windowed.

Discovered while testing #8775

@LordAro
Copy link
Member

@LordAro LordAro commented Mar 1, 2021

I've reproduced this too, on Linux (using Win+F to fullscreen in that case, but whatever)
Around the same time I got a crash as well. Didn't look further, but I suspect this & #8775 are the same issue.

@TrueBrain TrueBrain added this to the 1.11.0 milestone Mar 2, 2021
@TrueBrain
Copy link
Member

@TrueBrain TrueBrain commented Mar 3, 2021

Sounds like a missing "mark dirty" on the window :)

@TrueBrain TrueBrain added the bug label Mar 3, 2021
TrueBrain added a commit to TrueBrain/OpenTTD that referenced this issue Mar 8, 2021
… visibly

Basically, the window was not invalidated, so it was never redrawn.
This made it look like it wasn't working, but it really was.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug
Projects
None yet
Development

No branches or pull requests

3 participants