From 1b2e8437ac53b8b59473ab7b490f5c3623cef06b Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Tue, 31 Aug 2021 09:35:27 +0300 Subject: [PATCH] Use precomputed workspace geometry in Workspace::initializeX11() When initializeX11() is called, the workspace geometry is known, so it doesn't need to be computed again. --- src/workspace.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/workspace.cpp b/src/workspace.cpp index 9fb3d0f33f..6721c29ed4 100644 --- a/src/workspace.cpp +++ b/src/workspace.cpp @@ -402,13 +402,10 @@ void Workspace::initializeX11() NETPoint* viewports = new NETPoint[VirtualDesktopManager::self()->count()]; rootInfo->setDesktopViewport(VirtualDesktopManager::self()->count(), *viewports); delete[] viewports; - QRect geom; - for (int i = 0; i < screens()->count(); i++) { - geom |= screens()->geometry(i); - } + NETSize desktop_geometry; - desktop_geometry.width = geom.width(); - desktop_geometry.height = geom.height(); + desktop_geometry.width = m_geometry.width(); + desktop_geometry.height = m_geometry.height(); rootInfo->setDesktopGeometry(desktop_geometry); setShowingDesktop(false);