Workspace: only calculate the clientArea for the wayland window when necessary

No need to calculate it just to discard it.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
This commit is contained in:
Aleix Pol Gonzalez 2024-04-26 18:11:29 +02:00 committed by Aleix Pol Gonzalez
parent 7916352f5b
commit 04643fa3d8

View file

@ -799,7 +799,6 @@ void Workspace::addWaylandWindow(Window *window)
window->updateLayer();
if (window->isPlaceable()) {
const QRectF area = clientArea(PlacementArea, window, activeOutput());
bool placementDone = false;
if (window->isRequestedFullScreen()) {
placementDone = true;
@ -811,6 +810,7 @@ void Workspace::addWaylandWindow(Window *window)
placementDone = true;
}
if (!placementDone) {
const QRectF area = clientArea(PlacementArea, window, activeOutput());
m_placement->place(window, area);
}
}