Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 92b5ddf9 authored by Martin Flöser's avatar Martin Flöser

Drop VirtualDesktopManager::m_isLoading

Summary: VirtualDesktopManager already had a loading check. We don't need two.

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D17724
parent 96496a86
......@@ -536,6 +536,8 @@ bool VirtualDesktopManager::setCurrent(VirtualDesktop *newDesktop)
return true;
}
static bool s_loadingDesktopSettings = false;
void VirtualDesktopManager::setCount(uint count)
{
count = qBound<uint>(1, count, VirtualDesktopManager::maximum());
......@@ -565,7 +567,7 @@ void VirtualDesktopManager::setCount(uint count)
while (uint(m_desktops.count()) < count) {
auto vd = new VirtualDesktop(this);
vd->setX11DesktopNumber(m_desktops.count() + 1);
if (!m_isLoading) {
if (!s_loadingDesktopSettings) {
vd->setId(QUuid::createUuid().toString().toUtf8());
}
m_desktops << vd;
......@@ -654,16 +656,12 @@ void VirtualDesktopManager::updateLayout()
);
}
static bool s_loadingDesktopSettings = false;
void VirtualDesktopManager::load()
{
s_loadingDesktopSettings = true;
if (!m_config) {
return;
}
//FIXME: how to avoid this?
m_isLoading = true;
QString groupname;
if (screen_number == 0) {
groupname = QStringLiteral("Desktops");
......@@ -710,7 +708,6 @@ void VirtualDesktopManager::load()
}
s_loadingDesktopSettings = false;
m_isLoading = false;
}
void VirtualDesktopManager::save()
......
......@@ -495,7 +495,6 @@ private:
NETRootInfo *m_rootInfo;
KWayland::Server::PlasmaVirtualDesktopManagementInterface *m_virtualDesktopManagement = nullptr;
KSharedConfig::Ptr m_config;
bool m_isLoading = false;
KWIN_SINGLETON_VARIABLE(VirtualDesktopManager, s_manager)
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment