optimize updateVisibility() when not showing the desktop
This commit is contained in:
parent
b6478e1b12
commit
0efbcdb1fa
1 changed files with 12 additions and 10 deletions
22
client.cpp
22
client.cpp
|
@ -1140,16 +1140,18 @@ void Client::updateVisibility()
|
|||
internalHide(Allowed);
|
||||
return;
|
||||
}
|
||||
bool belongs_to_desktop = false;
|
||||
for (ClientList::ConstIterator it = group()->members().constBegin();
|
||||
it != group()->members().constEnd();
|
||||
++it)
|
||||
if ((*it)->isDesktop()) {
|
||||
belongs_to_desktop = true;
|
||||
break;
|
||||
}
|
||||
if (!belongs_to_desktop && workspace()->showingDesktop())
|
||||
workspace()->resetShowingDesktop(true);
|
||||
if( workspace()->showingDesktop()) {
|
||||
bool belongs_to_desktop = false;
|
||||
for (ClientList::ConstIterator it = group()->members().constBegin();
|
||||
it != group()->members().constEnd();
|
||||
++it)
|
||||
if ((*it)->isDesktop()) {
|
||||
belongs_to_desktop = true;
|
||||
break;
|
||||
}
|
||||
if (!belongs_to_desktop)
|
||||
workspace()->resetShowingDesktop(true);
|
||||
}
|
||||
internalShow(Allowed);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue