[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
This commit is contained in:
parent
bd58d7792f
commit
8bbd53a774
3 changed files with 7 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue