Bug 461937

Summary: Kate doesn't retain last non-maximised window size after closing it in maximised state
Product: [Frameworks and Libraries] frameworks-kxmlgui Reporter: serfreeman1337 <serfreeman1337>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs>
Status: REOPENED ---    
Severity: normal CC: cullmann, ptselios
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: kate exiting maximise with default window size

Description serfreeman1337 2022-11-17 07:39:40 UTC
SUMMARY
Kate will reset window size to 510x640px if it was closed in maximised state. 

STEPS TO REPRODUCE
1. Open Kate, adjust window size/position, close it.
2. Open Kate again, observe correct window size/position .
3. Maximise Kate and close it.
4. Open Kate one more time (it will open in maximised state).
5. Drag window by titlebar (or click Restore) to exit maximised state.

OBSERVED RESULT
After exiting maximised state Kate reset window size to 510x640px.

EXPECTED RESULT
After exiting maximised state Kate should retain last known non maximised window size.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.26.3
KDE Frameworks Version: 5.99.0
Qt Version: 5.15.7
Comment 1 Christoph Cullmann 2022-12-31 19:02:58 UTC
Works for me in 22.12.
In the session config page I have "Include window con..." enabled
Comment 2 Christoph Cullmann 2022-12-31 19:33:44 UTC
*** Bug 452595 has been marked as a duplicate of this bug. ***
Comment 3 serfreeman1337 2023-01-01 07:40:29 UTC
Created attachment 154939 [details]
kate exiting maximise with default window size

Still can reproduce this on Arch KDE Wayland and KDE Neon Unstable X11. Video demonstration attached. 
0:05 - kate entering and exiting maximise state with last know window size - good
0:08 - after closing and opening it in maximised state it exits with default 640x510 window size - bug

Also I'm not sure if bug #452595 is a duplicate of this, since that one is about starting position, while this one is about window size after exiting from maximised  state.