diff --git a/autotests/integration/shell_client_test.cpp b/autotests/integration/shell_client_test.cpp index 1a3d6a693a..46f74d85b0 100644 --- a/autotests/integration/shell_client_test.cpp +++ b/autotests/integration/shell_client_test.cpp @@ -263,6 +263,13 @@ void TestShellClient::testMinimizeActiveWindow() workspace()->slotWindowMinimize(); QVERIFY(!c->isActive()); QVERIFY(!workspace()->activeClient()); + QVERIFY(c->isMinimized()); + + // unminimize again + c->unminimize(); + QVERIFY(!c->isMinimized()); + QVERIFY(c->isActive()); + QCOMPARE(workspace()->activeClient(), c); } WAYLANDTEST_MAIN(TestShellClient) diff --git a/shell_client.cpp b/shell_client.cpp index 79ed8b265f..ae63f2fe34 100644 --- a/shell_client.cpp +++ b/shell_client.cpp @@ -1230,7 +1230,11 @@ KWayland::Server::XdgShellSurfaceInterface::States ShellClient::xdgSurfaceStates void ShellClient::doMinimize() { - workspace()->clientHidden(this); + if (isMinimized()) { + workspace()->clientHidden(this); + } else { + emit windowShown(this); + } } }