Simplify desktop check in AbstractClient::setOnAllDesktops()

This commit is contained in:
Vlad Zahorodnii 2021-08-13 09:57:42 +03:00
parent 86fa79c33b
commit 8e8fc55b0b

View file

@ -539,9 +539,9 @@ void AbstractClient::leaveDesktop(VirtualDesktop *virtualDesktop)
void AbstractClient::setOnAllDesktops(bool b) void AbstractClient::setOnAllDesktops(bool b)
{ {
if ((b && isOnAllDesktops()) || if (b == isOnAllDesktops()) {
(!b && !isOnAllDesktops()))
return; return;
}
if (b) { if (b) {
setDesktops({}); setDesktops({});
} else { } else {