Only create decoration once during Client::manage

Client::manage calls setupCompositing on the not
yet fully managed client before it wants to create
the window decoration. This means the decoration is
created twice and maybe even if not needed (noBorder
not yet set).

If the Client is not yet managed setupCompositing
will not update the decoration - it will be handled
by manage later on.

Furthermore if compositing is not active, setup
compositing does not have to perform any action.

REVIEW: 104758
This commit is contained in:
Martin Gräßlin 2012-04-27 16:25:06 +02:00
parent de5003299b
commit f1a50e0fb5

View file

@ -883,8 +883,10 @@ bool Client::setupCompositing()
return false;
}
updateVisibility(); // for internalKeep()
updateDecoration(true, true);
move(calculateGravitation(true)); // we just polluted the gravity because the window likely has no decoration yet
if (isManaged()) {
// only create the decoration when a client is managed
updateDecoration(true, true);
}
return true;
}