diff --git a/abstract_client.h b/abstract_client.h --- a/abstract_client.h +++ b/abstract_client.h @@ -803,7 +803,7 @@ Layer belongsToLayer() const; virtual bool belongsToDesktop() const; void invalidateLayer(); - virtual bool isActiveFullScreen() const; + bool isActiveFullScreen() const; virtual Layer layerForDock() const; // electric border / quick tiling diff --git a/abstract_client.cpp b/abstract_client.cpp --- a/abstract_client.cpp +++ b/abstract_client.cpp @@ -1152,7 +1152,7 @@ // according to NETWM spec implementation notes suggests // "focused windows having state _NET_WM_STATE_FULLSCREEN" to be on the highest layer. // we'll also take the screen into account - return ac && (ac == this || ac->screen() != screen()); + return ac && (ac == this || ac->screen() != screen()|| ac->allMainClients().contains(const_cast(this))); } #define BORDER(which) \ diff --git a/autotests/integration/x11_client_test.cpp b/autotests/integration/x11_client_test.cpp --- a/autotests/integration/x11_client_test.cpp +++ b/autotests/integration/x11_client_test.cpp @@ -593,8 +593,11 @@ // first client should be moved back to normal layer QCOMPARE(client->isActive(), false); QCOMPARE(client->isFullScreen(), true); - QEXPECT_FAIL("", "BUG 388310", Continue); QCOMPARE(client->layer(), NormalLayer); + + // activating the fullscreen window again, should move it to active layer + workspace()->activateClient(client); + QTRY_COMPARE(client->layer(), ActiveLayer); } WAYLANDTEST_MAIN(X11ClientTest) diff --git a/client.h b/client.h --- a/client.h +++ b/client.h @@ -389,7 +389,6 @@ void doSetSkipPager() override; void doSetSkipTaskbar() override; bool belongsToDesktop() const override; - bool isActiveFullScreen() const override; void setGeometryRestore(const QRect &geo) override; void updateTabGroupStates(TabGroup::States states) override; void doMove(int x, int y) override; diff --git a/layers.cpp b/layers.cpp --- a/layers.cpp +++ b/layers.cpp @@ -819,19 +819,4 @@ return false; } -bool Client::isActiveFullScreen() const -{ - if (AbstractClient::isActiveFullScreen()) { - return true; - } - if (!isFullScreen()) - return false; - - const Client* ac = dynamic_cast(workspace()->mostRecentlyActivatedClient()); // instead of activeClient() - avoids flicker - // according to NETWM spec implementation notes suggests - // "focused windows having state _NET_WM_STATE_FULLSCREEN" to be on the highest layer. - // we'll also take the screen into account - return ac && (this->group() == ac->group()); -} - } // namespace