Opened 4 weeks ago

Closed 2 weeks ago

#16666 closed defect (fixed)

GUI: ScummVM does not correctly restore the window size if it's closed when maximized

Reported by: antoniou79 Owned by: lephilousophe
Priority: normal Component: GUI
Version: Keywords:
Cc: Game:

Description

This was tested with ScummVM 2026.2.0, and a recent daily ScummVM 2026.2.1git on Windows 10 x64.

Steps to reproduce:

  • Launch ScummVM in windowed mode (say window dimensions 800x600 in a 1920x1080 desktop resolution).
  • Maximize the ScummVM window.
  • Quit ScummVM
  • Relaunch ScummVM. The launcher window will be (correctly) in maximized state now.
  • "Restore" the window size, by clicking on the restore button from the window Controls on the title bar.

The ScummVM window won't return to its original 800x600 dimensions (even though those were written back to the ini file, as last_window_width and last_window_height, when we quit ScummVM while in maximized state). Instead it will get new dimensions, quite close to the maximized ones.

Change History (3)

comment:1 by macca8, 4 weeks ago

On macOS, the maximized state doesn't persist after a maximized window is closed, so I'm not sure how much of this relates to Windows, but hopefully it may help.

For me, this issue occurs because window_maximized=true isn't reset to false when the window is closed, which forces ScummVM to target the wrong dimensions (i.e. window_maximized_w/h), either on relaunch or when creating the next window.

Having said that, there's been a change in the config file as to where these incorrect settings are stored.

Previously, these settings adjusted window_maximized_w/h dimensions (locking window_maximized=true, which denied access to last_window_w/h dimensions), but now it changes last_window_w/h dimensions and resets window_maximized to false.

The config changes occurred between 2026.1.0 & 2026.2.0 (at least early February).

Last edited 4 weeks ago by macca8 (previous) (diff)

comment:2 by lephilousophe, 3 weeks ago

Owner: set to lephilousophe
Resolution: fixed
Status: newpending

PR #7443 should fix this

comment:3 by Le Philousophe <lephilousophe@…>, 2 weeks ago

Status: pendingclosed

In 994dc04a:

BACKENDS: OPENGLSDL: Don't store a size for the maximized state

Fix #16666

When restoring from the maximized state while the maximized size was
used when creating the window, the window manager restores to something
sensible instead of using the last restored size we used.
As the maximized size has no real use, don't store and use it.

Note: See TracTickets for help on using tickets.