diff options
author | David Edmundson <davidedmundson@kde.org> | 2023-12-13 12:43:27 +0000 |
---|---|---|
committer | David Edmundson <davidedmundson@kde.org> | 2024-02-20 09:34:46 +0000 |
commit | fdb29f3f6fa83e030ba8be30f3e23ff21dea6b5a (patch) | |
tree | 126b4fdadb588330d31e326d73fa50ec36ad9614 /src | |
parent | d3733346a6fa0d7ca5cc10bc0919eadc7142e13b (diff) |
client: Fix xdg shell setting only a minimum size hint
An unbound maximum size is sent across the protocol as 0.
We need to make this change before the check that the minimum size is
less than the maximum size.
This fixes having only a minimum size set. This bug is currently masked
by the platform forcefully applying the minimum size.
Pick-to: 6.6
Pick-to: 6.7
Change-Id: Ifca4fa01e4c2ac1c34aeb72db1584e4a868d50bc
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp index 57370f359..566a0ff47 100644 --- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp +++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp @@ -424,15 +424,16 @@ void QWaylandXdgSurface::setSizeHints() const int minHeight = qMax(0, minSize.height()); int maxWidth = qMax(0, maxSize.width()); int maxHeight = qMax(0, maxSize.height()); - if (maxWidth == QWINDOWSIZE_MAX) - maxWidth = 0; - if (maxHeight == QWINDOWSIZE_MAX) - maxHeight = 0; // It will not change min/max sizes if invalid. if (minWidth > maxWidth || minHeight > maxHeight) return; + if (maxWidth == QWINDOWSIZE_MAX) + maxWidth = 0; + if (maxHeight == QWINDOWSIZE_MAX) + maxHeight = 0; + m_toplevel->set_min_size(minWidth, minHeight); m_toplevel->set_max_size(maxWidth, maxHeight); } |