Commit 8bbd53a7 authored by Martin Flöser's avatar Martin Flöser
Browse files

[wayland] Properly implement minimize of ShellClient

Summary:
We need to call Workspace::clientHidden when minimizing. Otherwise
Workspace doesn't update the active client and the now minimized
window is still active.

BUG: 366634

Test Plan:
Test case works now and also tested in nested setup that
active window changes.

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2410
parent bd58d779
......@@ -261,9 +261,7 @@ void TestShellClient::testMinimizeActiveWindow()
QCOMPARE(workspace()->activeClient(), c);
workspace()->slotWindowMinimize();
QEXPECT_FAIL("", "BUG 366634", Continue);
QVERIFY(!c->isActive());
QEXPECT_FAIL("", "BUG 366634", Continue);
QVERIFY(!workspace()->activeClient());
}
......
......@@ -646,7 +646,7 @@ bool ShellClient::isResizable() const
bool ShellClient::isShown(bool shaded_is_shown) const
{
Q_UNUSED(shaded_is_shown)
return !m_closing && !m_unmapped;
return !m_closing && !m_unmapped && !isMinimized();
}
void ShellClient::hideClient(bool hide)
......@@ -1228,4 +1228,9 @@ KWayland::Server::XdgShellSurfaceInterface::States ShellClient::xdgSurfaceStates
return states;
}
void ShellClient::doMinimize()
{
workspace()->clientHidden(this);
}
}
......@@ -137,6 +137,7 @@ protected:
void doResizeSync() override;
bool isWaitingForMoveResizeSync() const override;
bool acceptsFocus() const override;
void doMinimize() override;
private Q_SLOTS:
void clientFullScreenChanged(bool fullScreen);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment