Fix crash when unminizing a ShellClient
On unminize we should not call windowHidden, but windowShown. Reviewed-By: bshah
This commit is contained in:
parent
9581f23ed8
commit
a4af242081
2 changed files with 12 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue