optimize updateVisibility() when not showing the desktop

This commit is contained in:
Luboš Luňák 2011-10-03 17:12:07 +02:00
parent b6478e1b12
commit 0efbcdb1fa

View file

@ -1140,6 +1140,7 @@ void Client::updateVisibility()
internalHide(Allowed); internalHide(Allowed);
return; return;
} }
if( workspace()->showingDesktop()) {
bool belongs_to_desktop = false; bool belongs_to_desktop = false;
for (ClientList::ConstIterator it = group()->members().constBegin(); for (ClientList::ConstIterator it = group()->members().constBegin();
it != group()->members().constEnd(); it != group()->members().constEnd();
@ -1148,8 +1149,9 @@ void Client::updateVisibility()
belongs_to_desktop = true; belongs_to_desktop = true;
break; break;
} }
if (!belongs_to_desktop && workspace()->showingDesktop()) if (!belongs_to_desktop)
workspace()->resetShowingDesktop(true); workspace()->resetShowingDesktop(true);
}
internalShow(Allowed); internalShow(Allowed);
} }