https://bugs.kde.org/show_bug.cgi?id=512741

            Bug ID: 512741
           Summary: Window size is incorrectly restored to maximized
                    dimensions instead of pre-maximized dimensions when
                    closed while maximized
    Classification: Plasma
           Product: kwin
      Version First 6.5.3
       Reported In:
          Platform: Fedora RPMs
                OS: Linux
            Status: REPORTED
          Severity: major
          Priority: NOR
         Component: core
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

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.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to