Window size is incorrectly restored to maximized dimensions instead of pre-maximized dimensions when closed while maximized Some Software like Libreoffice or Telegram Desktop does not properly save and restore the window size/state when the application is closed while maximized. When a window is closed in the maximized state, all standard applications are expected to restore the window to its original floating (pre-maximized) size and position upon the next launch. Instead, LibreOffice etc stores the maximized screen dimensions as the window's last known floating size. Consequently, when the application is opened again, the window appears in a floating (un-maximized) state, but with the full size of the screen (the maximized dimensions), instead of its original small size. This behavior is extremely annoying, especially when the maximized state was achieved on a very large monitor (like a 4K display or external monitor), as the window becomes unusable on a smaller screen upon reopening. STEPS TO REPRODUCE 1. Open a software like libreoffice (e.g., Calc or Writer)., blender, Telegram Desktop etc 2. Resize the window to a small, custom size (e.g., 100×200 pixels) and ensure it is not maximized (floating state). 3. Maximize the software window using the title bar button. (The size is now the screen size, e.g., 1440×900). 4. Close the document/application while it is still in the maximized state. 5. Re-open the same software. in libreoffice, (if you open writer at first step, you must reopen writer and not Calc or Impress) OBSERVED RESULT The window size, instead of being displayed at its dimensions before maximization, is shown at the maximized dimensions, even though the application itself is not maximized and is floating. EXPECTED RESULT It should open in its pre-maximize dimensions. This means that if the window is 320×300 in the first step and we maximize it, after closing and reopening the window, its dimensions should be 320×300, not 1440×900, which is my monitor's resolution. Additional Info: Version: 25.8.3.2 (X86_64) / LibreOffice Community Build ID: 8ca8d55c161d602844f5428fa4b58097424e324e CPU threads: 12; OS: Linux 6.17; UI render: default; VCL: gtk3 Locale: en-US (en_US.UTF-8); UI: en-US Flatpak Calc: threaded --- Operating System: Fedora Linux 42 KDE Plasma Version: 6.5.3 KDE Frameworks Version: 6.20.0 Qt Version: 6.9.3 Kernel Version: 6.17.8-200.fc42.x86_64 (64-bit) Graphics Platform: Wayland Processors: 12 × 13th Gen Intel® Core™ i5-13420H Memory: 32 GiB of RAM (31.0 GiB usable) Graphics Processor 1: Intel® Graphics Graphics Processor 2: NVIDIA GeForce RTX 3050 6GB Laptop GPU Manufacturer: HP Product Name: Victus by HP Gaming Laptop 15-fa1xxx ADDITIONAL INFORMATION The problem is severe because I connect a large external monitor to my laptop. When I maximize a window on the large monitor and then close it while it's still maximized, the next time I open the same application when the external monitor is not connected, the window displays at the large monitor's dimensions but on my small laptop screen. This makes it difficult to resize and is frustrating.
Created attachment 187237 [details] My journalctl Err level log file # journalctl error log level
Created attachment 187238 [details] Warning level logs
KWin doesn't restore window sizes, please report this to the relevant applications.
I cannot reproduce it with LibreOffice 25.8.3.2 on Debian 14 + KDE Plasma 6.5.3 Not even by opening the LibreOffice Writer afterwards, which seems to have remembered my maximized status preference from the main (general, initial) LibreOffice.
ترجمه انگلیسی: Did you follow this exact procedure? Open LibreOffice Writer. Minimize its size (or make the window smaller). Maximize it, and then close it. And then open Writer again: Is the window size small, like in the second step?
I'm Trying to Record a video
Created attachment 187250 [details] A video regarding this issue.
Created attachment 187251 [details] Look
(In reply to Zamundaaa from comment #3) > KWin doesn't restore window sizes, please report this to the relevant > applications. Several applications like Blender, Telegram Desktop, and LibreOffice are affected by this issue. Does it have any relation to KWin? I have reported it for LibreOffice but haven't received a reply yet.
No relation to KWin, no. At least until the session restoration protocol is merged and implemented by these apps, it's completely up to each app to restore these properties correctly.