xdgshellwindow: never request clients to resize to a negative size

Doing that can cause clients to crash

BUG: 489983
This commit is contained in:
Xaver Hugl 2024-07-18 15:41:02 +02:00
parent c3d202b0d2
commit 01d9393e80

View file

@ -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()) {