Make NETRootInfo initialization reasonable
The documentation of NETRootInfo::activate() says that it should be called after creating the NETRootInfo object to read properties. However, it's called in two places: VirtualDesktopManager::setRows() and Workspace::initializeX11(). At quick glance, there's no justifying reason to call activate() in setRows(), it doesn't fit the purpose of setRows(). This change re-arranges NETRootInfo initialization code so it makes more sense.
This commit is contained in:
parent
993f110d59
commit
8b29f07dbe
2 changed files with 2 additions and 2 deletions
|
@ -610,7 +610,6 @@ void VirtualDesktopManager::setRows(uint rows)
|
|||
}
|
||||
if (m_rootInfo) {
|
||||
m_rootInfo->setDesktopLayout(NET::OrientationHorizontal, columns, m_rows, NET::DesktopLayoutCornerTopLeft);
|
||||
m_rootInfo->activate();
|
||||
}
|
||||
|
||||
updateLayout();
|
||||
|
|
|
@ -303,9 +303,10 @@ void Workspace::initializeX11()
|
|||
m_nullFocus->map();
|
||||
|
||||
RootInfo *rootInfo = RootInfo::create();
|
||||
rootInfo->activate();
|
||||
|
||||
const auto vds = VirtualDesktopManager::self();
|
||||
vds->setRootInfo(rootInfo);
|
||||
rootInfo->activate();
|
||||
|
||||
// TODO: only in X11 mode
|
||||
// Extra NETRootInfo instance in Client mode is needed to get the values of the properties
|
||||
|
|
Loading…
Reference in a new issue