scripting: Do not crash when calling workspace.clientArea() without an output

Just set a default one, one way less a script can crash kwin.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
This commit is contained in:
Aleix Pol Gonzalez 2024-06-05 17:12:24 +02:00
parent 68d1e2f42a
commit 3c857a3375

View file

@ -250,6 +250,9 @@ QRectF WorkspaceWrapper::clientArea(ClientAreaOption option, KWin::Window *c) co
QRectF WorkspaceWrapper::clientArea(ClientAreaOption option, Output *output, VirtualDesktop *desktop) const
{
if (!output) {
return QRect();
}
return workspace()->clientArea(static_cast<clientAreaOption>(option), output, desktop);
}