Bug 467356

Summary: If window was maximized when entering Full Screen mode, leaving Full Screen Mode de-maximizes the window
Product: [Applications] Elisa Reporter: Emir SARI <emir_sari>
Component: generalAssignee: Matthieu Gallien <matthieu_gallien>
Status: RESOLVED FIXED    
Severity: minor CC: nate
Priority: NOR    
Version: 22.12.3   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 23.04

Description Emir SARI 2023-03-14 17:57:31 UTC
Steps
1. Maximise the window using the Plasma window controls
2. Enter Full Screen Mode
3. Exit Full Screen Mode

Expected
1. Elisa should return to the Maximised state

Actual
1. Elisa returns to a irrelevant non-maximised position
Comment 1 Nate Graham 2023-03-15 17:13:31 UTC
Can confirm. Will investigate, but I think there's a chance this is actually a KWin bug.
Comment 2 Nate Graham 2023-03-15 21:25:52 UTC
Ah no, it's an Elisa bug. When exiting full screen, we run showNormal() which explicitly makes it windowed. We need to keep track of whether the prior state was windowed or maximized, and if it was maximized, do showMaximized() instead.
Comment 3 Bug Janitor Service 2023-03-16 01:54:17 UTC
A possibly relevant merge request was started @ https://invent.kde.org/multimedia/elisa/-/merge_requests/423
Comment 4 Emir SARI 2023-03-16 09:23:00 UTC
Thank you!
Comment 5 Nate Graham 2023-03-16 15:00:59 UTC
You're welcome!
Comment 6 Nate Graham 2023-03-16 15:22:08 UTC
Git commit b5247cc21289759384f18422e36d83b9a41e2dff by Nate Graham.
Committed on 16/03/2023 at 15:04.
Pushed by ngraham into branch 'master'.

Restore prior state correctly when leaving full screen mode

Previously we would always make the window windowed when leaving full
screen mode. But this isn't the only possible state for the window to be
in at the moment it entered full screen mode. Let's handle all of those
states properly.
FIXED-IN: 23.04

M  +1    -1    src/qml/ApplicationMenu.qml
M  +31   -0    src/qml/ElisaMainWindow.qml
M  +1    -1    src/qml/HeaderBar.qml
M  +1    -1    src/qml/NativeGlobalMenu.qml

https://invent.kde.org/multimedia/elisa/commit/b5247cc21289759384f18422e36d83b9a41e2dff
Comment 7 Nate Graham 2023-03-16 15:29:20 UTC
Git commit 58e3ab100e36271dca5700edccec5b30e8463c75 by Nate Graham.
Committed on 16/03/2023 at 15:28.
Pushed by ngraham into branch 'release/23.04'.

Restore prior state correctly when leaving full screen mode

Previously we would always make the window windowed when leaving full
screen mode. But this isn't the only possible state for the window to be
in at the moment it entered full screen mode. Let's handle all of those
states properly.
FIXED-IN: 23.04
(cherry picked from commit b5247cc21289759384f18422e36d83b9a41e2dff)

M  +1    -1    src/qml/ApplicationMenu.qml
M  +31   -0    src/qml/ElisaMainWindow.qml
M  +1    -1    src/qml/HeaderBar.qml
M  +1    -1    src/qml/NativeGlobalMenu.qml

https://invent.kde.org/multimedia/elisa/commit/58e3ab100e36271dca5700edccec5b30e8463c75