From b587926803049b08a3b70e52a566f5cc597d321d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Thu, 1 Oct 2015 08:44:26 +0200 Subject: [PATCH] [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 --- workspace.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/workspace.cpp b/workspace.cpp index 8438c5d548..12851da7e1 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -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);