diff --git a/src/xdgshellwindow.cpp b/src/xdgshellwindow.cpp index ddc476d66b..61e588a898 100644 --- a/src/xdgshellwindow.cpp +++ b/src/xdgshellwindow.cpp @@ -691,8 +691,8 @@ XdgSurfaceConfigure *XdgToplevelWindow::sendRoleConfigure() const QSizeF nextClientSize = moveResizeGeometry().size(); if (!nextClientSize.isEmpty()) { - nextClientSize.rwidth() -= framePadding.width(); - nextClientSize.rheight() -= framePadding.height(); + nextClientSize.setWidth(std::max(1.0, nextClientSize.width() - framePadding.width())); + nextClientSize.setHeight(std::max(1.0, nextClientSize.height() - framePadding.height())); } if (nextClientSize.isEmpty()) {