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.
This commit is contained in:
Vlad Zahorodnii 2021-08-31 09:35:27 +03:00
parent e198727e15
commit 1b2e8437ac

View file

@ -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);