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

Fix crash when unminizing a ShellClient

On unminize we should not call windowHidden, but windowShown.

Reviewed-By: bshah
parent 9581f23e
......@@ -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)
......
......@@ -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);
}
}
}
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