Created attachment 142415 [details] A minimal project for reproducing the issue SUMMARY If the window's minimum size increased while it was maximized, restoring results in the window being smaller than the content. STEPS TO COMPILE MINIMAL PROJECT Please compile the attached minimal Qt project as follows: mkdir build && cd build && cmake .. && make && ./restoreTest STEPS TO REPRODUCE 1. Run restoreTest 2. Click the left button (hides the right button) 3. Manually resize the window to its minimum size 4. Click maximize 5. Click the left button (shows the right button) 6. Click restore (un-maximize) or drag from the title bar. OBSERVED RESULT The window resizes to the size it had before it was maximized, ignoring the window's minimum size. (In the attached example, the buttons partially overlap due to this.) EXPECTED RESULT The window resizes to the window's minimum size because the size it had before maximizing is too small. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Manjaro Linux KDE Plasma Version: 5.22.5 KDE Frameworks Version: 5.86.0 Qt Version: 5.15.2 ADDITIONAL INFORMATION - I stumbled across this bug while working on KCalc: https://invent.kde.org/utilities/kcalc/-/merge_requests/24#note_309550 - I attached a minimal project that is sufficient to reproduce the issue.
Created attachment 142416 [details] A video showing the issue on Plasma/KWin
Created attachment 142417 [details] A video showing the provided minimal project running correctly on Gnome for reference
Yeah, currently, kwin doesn't handle geometry size hints updates while the window is maximized.