Fix updating layer when setting a ShellClient to fullscreen

Summary:
The call to update the layer was performed before adjusting to
fullscreen. Thus the layer didn't get updated at all as it still
evaluated to "not fullscreen".

Reviewers: #kwin, #plasma_on_wayland, bshah

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2758
This commit is contained in:
Martin Gräßlin 2016-09-13 10:33:28 +02:00
parent 0bb1f2e7bf
commit 64126a9717
2 changed files with 2 additions and 2 deletions

View file

@ -366,7 +366,6 @@ void TestShellClient::testFullscreen()
QEXPECT_FAIL("wlShell - deco", "BUG 366764", Continue);
QEXPECT_FAIL("xdgShellV5 - deco", "BUG 366764", Continue);
QCOMPARE(c->geometry(), QRect(QPoint(0, 0), sizeChangeRequestedSpy.first().first().toSize()));
QEXPECT_FAIL("", "Fullscreen windows don't change layer", Continue);
QCOMPARE(c->layer(), ActiveLayer);
// swap back to normal

View file

@ -917,11 +917,12 @@ void ShellClient::requestGeometry(const QRect &rect)
void ShellClient::clientFullScreenChanged(bool fullScreen)
{
StackingUpdatesBlocker blocker(workspace());
workspace()->updateClientLayer(this); // active fullscreens get different layer
const bool emitSignal = m_fullScreen != fullScreen;
m_fullScreen = fullScreen;
workspace()->updateClientLayer(this); // active fullscreens get different layer
if (fullScreen) {
m_geomFsRestore = geometry();
requestGeometry(workspace()->clientArea(FullScreenArea, this));