xdgshellwindow: guard against sending negative configure bounds
It's unlikely to happen, but if it were to happen, it would cause crashes
This commit is contained in:
parent
099a1cc31f
commit
49f656a3d9
1 changed files with 2 additions and 2 deletions
|
@ -697,8 +697,8 @@ XdgSurfaceConfigure *XdgToplevelWindow::sendRoleConfigure() const
|
|||
|
||||
if (nextClientSize.isEmpty()) {
|
||||
QSizeF bounds = workspace()->clientArea(PlacementArea, this, moveResizeOutput()).size();
|
||||
bounds.rwidth() -= framePadding.width();
|
||||
bounds.rheight() -= framePadding.height();
|
||||
bounds.setWidth(std::max(1.0, bounds.width() - framePadding.width()));
|
||||
bounds.setHeight(std::max(1.0, bounds.height() - framePadding.height()));
|
||||
m_shellSurface->sendConfigureBounds(bounds.toSize());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue