Bug 443681 - Restore ignores minimum window size
Summary: Restore ignores minimum window size
Status: CONFIRMED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 5.22.5
Platform: Manjaro Linux
: LO normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-13 22:43 UTC by Niklas Freund
Modified: 2021-10-15 15:19 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
A minimal project for reproducing the issue (1.73 KB, application/zip)
2021-10-13 22:43 UTC, Niklas Freund
Details
A video showing the issue on Plasma/KWin (1.20 MB, video/mp4)
2021-10-13 22:45 UTC, Niklas Freund
Details
A video showing the provided minimal project running correctly on Gnome for reference (1.45 MB, video/mp4)
2021-10-13 22:48 UTC, Niklas Freund
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Niklas Freund 2021-10-13 22:43:40 UTC
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.
Comment 1 Niklas Freund 2021-10-13 22:45:49 UTC
Created attachment 142416 [details]
A video showing the issue on Plasma/KWin
Comment 2 Niklas Freund 2021-10-13 22:48:07 UTC
Created attachment 142417 [details]
A video showing the provided minimal project running correctly on Gnome for reference
Comment 3 Vlad Zahorodnii 2021-10-15 15:19:57 UTC
Yeah, currently, kwin doesn't handle geometry size hints updates while the window is maximized.