SUMMARY Cannot resize Qt window height to less than 150px on Wayland even if the content of the Window is smaller. STEPS TO REPRODUCE 1. Build a very basic Qt application ``` #include <QApplication> #include <QWidget> int main(int argc, char *argv[]) { QApplication a(argc, argv); QWidget w; w.resize(300, 50); w.setMinimumSize(300, 50); w.show(); return a.exec(); } ``` 2. Launch it. 3. Resize the window to increase height, then try to reduce height to original size OBSERVED RESULT The application when initially launched as the proper size (300x50). Then when trying to increase height a bit, the application size jump to 300x150. The application can be resized to something bigger than 300x150, but it cannot be resize back to an height of 50. It's as if the minimum window height was hard coded at 150. EXPECTED RESULT Declared minimum size in application code should be respected. The user should be able to reduce height up to the minimum declared size (in this case 50). SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 6.1.0 KDE Frameworks Version: 6.3.0 Qt Version: 6.7.1 Kernel Version: 6.9.5-arch1-1 (64-bit) Graphics Platform: Wayland Graphics Processor: Mesa Intel® UHD Graphics Scaling: 100% ; Screen resolution: 1920x1080 ADDITIONAL INFORMATION If the application is launched under Weston, it can be resized correctly. But for the record, the minimum size is not respected (as if the minimum size were 0). If the application is run under Xorg, it can be resized correctly, and the minimum size is properly enforced.
> It's as if the minimum window height was hard coded at 150. It is, it's the minimum size enforced by kwin.
Could you explain why kwin enforces this minimum size (why 150px)? Why do not trust the minimum size declared by the application?
Because some windows have broken minimum sizes and can be resized to just a single pixel in width and height, making them not only unusable, but also invisible and un-findable when launched. That's a showstopper for a regular user.
Maybe a minimum height of 100px instead of 150px is acceptable? If an user wants a minimum size greater than that for a particular application, it can still use rules.