[wayland] Introduce better placement checks for ShellClient

Similar to what we have in Client::manage we should not always
invoke the Placement algorithm. E.g. an initially fullscreened window
should not get placed.

This needs to be extended for more checks similar to Client::manage
and might indicate that we also need a ShellClient::manage.

REVIEW: 125469
This commit is contained in:
Martin Gräßlin 2015-10-01 08:44:26 +02:00
parent 0bf64446cd
commit b587926803

View file

@ -375,7 +375,14 @@ void Workspace::init()
[this] (ShellClient *c) {
if (!c->isInternal()) {
QRect area = clientArea(PlacementArea, Screens::self()->current(), c->desktop());
if (!c->isInitialPositionSet()) {
bool placementDone = false;
if (c->isInitialPositionSet()) {
placementDone = true;
}
if (c->isFullScreen()) {
placementDone = true;
}
if (!placementDone) {
Placement::self()->place(c, area);
}
m_allClients.append(c);