Running the following QML code: -------------- import QtQuick Window { width: 500 height: 500 minimumHeight: 333 } -------------- results in the minimum size being 150x150 Running with WAYLAND_DEBUG shows "xdg_toplevel#40.set_min_size(0, 333)", so KWin receives the correct size. The problem is the use of isEmpty() in https://invent.kde.org/plasma/kwin/-/blob/master/src/wayland/xdgshell.cpp#L578 which is true because the width is 0. This results in (0, 0) being passed to xdgshellwindow and later being expanded to (150, 150). The resulting min. size should be (150, 333) or (0, 333)
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/5864
Git commit 61332caa2026f10a43bbd9879c0c577188e5eef2 by Vlad Zahorodnii. Committed on 10/06/2024 at 12:29. Pushed by vladz into branch 'master'. wayland: Fix one dimensional size constraints QSize::isEmpty() will return true if either dimension is 0. On the other hand, given the current language in the spec, it seems like the client is allowed to set size constraints per dimension. M +10 -4 src/wayland/xdgshell.cpp https://invent.kde.org/plasma/kwin/-/commit/61332caa2026f10a43bbd9879c0c577188e5eef2
Git commit dde2a56f73d1beab049e1ebdec855f6cfe5798de by Vlad Zahorodnii. Committed on 10/06/2024 at 12:39. Pushed by vladz into branch 'Plasma/6.1'. wayland: Fix one dimensional size constraints QSize::isEmpty() will return true if either dimension is 0. On the other hand, given the current language in the spec, it seems like the client is allowed to set size constraints per dimension. (cherry picked from commit 61332caa2026f10a43bbd9879c0c577188e5eef2) M +10 -4 src/wayland/xdgshell.cpp https://invent.kde.org/plasma/kwin/-/commit/dde2a56f73d1beab049e1ebdec855f6cfe5798de