do not resume compositing when it's suspended and a client blocks it

REVIEW: 106900
CCBUG: 308438
This commit is contained in:
Ralf Jung 2012-10-26 16:18:16 +02:00
parent 70c35b8284
commit 805495c8ea

View file

@ -304,7 +304,7 @@ void Workspace::updateCompositeBlocking(Client *c)
if (c) { // if c == 0 we just check if we can resume
if (c->isBlockingCompositing()) {
if (!compositingBlocked) // do NOT attempt to call suspendCompositing(true); from within the eventchain!
QMetaObject::invokeMethod(this, "slotToggleCompositing", Qt::QueuedConnection);
QMetaObject::invokeMethod(this, "suspendCompositing", Qt::QueuedConnection, Q_ARG(bool, true));
compositingBlocked = true;
}
}
@ -320,8 +320,7 @@ void Workspace::updateCompositeBlocking(Client *c)
}
if (resume) { // do NOT attempt to call suspendCompositing(false); from within the eventchain!
compositingBlocked = false;
if (compositingSuspended)
QMetaObject::invokeMethod(this, "slotToggleCompositing", Qt::QueuedConnection);
QMetaObject::invokeMethod(this, "suspendCompositing", Qt::QueuedConnection, Q_ARG(bool, false));
}
}
}
@ -333,6 +332,10 @@ void Workspace::suspendCompositing()
void Workspace::suspendCompositing(bool suspend)
{
if (compositingSuspended == suspend) {
// nothing actually changes
return;
}
compositingSuspended = suspend;
finishCompositing();
setupCompositing(); // will do nothing if suspended