summaryrefslogtreecommitdiffstats
path: root/src/compositor/extensions/qwaylandxdgshellv5.cpp
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2018-03-07 16:30:30 +0100
committerJohan Helsing <johan.helsing@qt.io>2018-03-15 12:49:03 +0000
commit46ab6e3e398c8ccff612bca746ba417ec974f975 (patch)
tree9241e79926d98efda62368c3e4f42477ff3527d6 /src/compositor/extensions/qwaylandxdgshellv5.cpp
parent6d9ee7d4c1a03eb2a3b51f2338e39be9f2c0b3ed (diff)
Compositor API: Don't try to configure negative sizes
Change-Id: Ie9df312a1926ea5190f6e91268b8920ad519d794 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
Diffstat (limited to 'src/compositor/extensions/qwaylandxdgshellv5.cpp')
-rw-r--r--src/compositor/extensions/qwaylandxdgshellv5.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compositor/extensions/qwaylandxdgshellv5.cpp b/src/compositor/extensions/qwaylandxdgshellv5.cpp
index 13a95e17d..d696e082a 100644
--- a/src/compositor/extensions/qwaylandxdgshellv5.cpp
+++ b/src/compositor/extensions/qwaylandxdgshellv5.cpp
@@ -1192,7 +1192,8 @@ QSize QWaylandXdgSurfaceV5::sizeForResize(const QSizeF &size, const QPointF &del
else if (edge & BottomEdge)
height += delta.y();
- return QSizeF(width, height).toSize();
+ QSizeF newSize(qMax(width, 1.0), qMax(height, 1.0));
+ return newSize.toSize();
}
/*!