Skip to content

Save and restore maximization state

Reason for the change

Right now Elisa does not save and restore maximization state, and does something annoying instead: it makes the unmaximized window have the width and height of a maximized window!

Fix this by tracking maximization state explicitly. It needs to be done in a new onClosing signal handler because by the time the current aboutToQuit() binding executes, the window state has been changed from maximized to windowed internally by Qt.

For 24.12, we'll be able to migrate to KConfig.WindowStateSaver, assuming its own maximization state tracking gets fixed. For now, add the feature to the existing implementation.

Test plan

  1. Open window, close it, re-open it -> Window opens windowed
  2. Open window, maximize it, close it, re-open it -> Window opens maximized
  3. Open window, maximize it, close it, re-open it, un-maximize it -> window returns to size it had before being maximized

Bugs fixed

BUG: 428510 FIXED-IN: 24.08.0

cc @jackh

Merge request reports

Loading