Bug 428510 - Elisa does not remember maximization state, but instead opens un-maximized at full screen size
Summary: Elisa does not remember maximization state, but instead opens un-maximized at...
Status: RESOLVED FIXED
Alias: None
Product: Elisa
Classification: Applications
Component: general (show other bugs)
Version: 24.02.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Matthieu Gallien
URL:
Keywords:
: 487685 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-10-31 14:44 UTC by Patrick Silva
Modified: 2024-08-06 21:37 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 24.08.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2020-10-31 14:44:05 UTC
STEPS TO REPRODUCE
1. open Elisa on Wayland session
2. maximize Elisa
3. restart Elisa

OBSERVED RESULT
the maximize/restore button in the window decoration indicates that
Elisa is not maximized despite it occupies the whole screen

EXPECTED RESULT
Elisa should remember its maximized state on Wayland

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.20.80
KDE Frameworks Version: 5.76.0
Qt Version: 5.15.0
Comment 1 Matthieu Gallien 2020-10-31 14:59:21 UTC
Thanks for your report. I now have a working Plasma Wayland setup. I will have a look today.
Comment 2 Matthieu Gallien 2020-10-31 22:56:51 UTC
I can confirm that I can reproduce this.

It is also the case when running on Windows platform.
Comment 3 Nate Graham 2020-11-11 18:13:56 UTC
It has this problem on X11 too. It seems to manually remember its size rather than using the appropriate kconfig functions, which handle the maximized case automatically.
Comment 4 Jack Hill 2024-05-31 16:39:46 UTC
*** Bug 487685 has been marked as a duplicate of this bug. ***
Comment 5 Bug Janitor Service 2024-08-03 14:55:50 UTC
A possibly relevant merge request was started @ https://invent.kde.org/multimedia/elisa/-/merge_requests/600
Comment 6 Nate Graham 2024-08-06 21:03:16 UTC
Git commit 4216ed903fd43b8de93cb850d30895ca7ac69f8a by Nate Graham.
Committed on 06/08/2024 at 20:45.
Pushed by ngraham into branch 'master'.

Save and restore maximization state

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.
FIXED-IN: 24.08.0

M  +20   -5    src/qml/ElisaMainWindow.qml

https://invent.kde.org/multimedia/elisa/-/commit/4216ed903fd43b8de93cb850d30895ca7ac69f8a
Comment 7 Nate Graham 2024-08-06 21:37:49 UTC
Git commit ff0669fa806fe0fa0fc2395a067022fabf597288 by Nate Graham.
Committed on 06/08/2024 at 21:37.
Pushed by ngraham into branch 'release/24.08'.

Save and restore maximization state

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.
FIXED-IN: 24.08.0


(cherry picked from commit 4216ed903fd43b8de93cb850d30895ca7ac69f8a)

Co-authored-by: Nate Graham <nate@kde.org>

M  +20   -5    src/qml/ElisaMainWindow.qml

https://invent.kde.org/multimedia/elisa/-/commit/ff0669fa806fe0fa0fc2395a067022fabf597288