diff --git a/autotests/integration/shell_client_test.cpp b/autotests/integration/shell_client_test.cpp index f84eb6bc4c..016e793a1a 100644 --- a/autotests/integration/shell_client_test.cpp +++ b/autotests/integration/shell_client_test.cpp @@ -276,9 +276,7 @@ void TestShellClient::testMinimizeActiveWindow() workspace()->slotWindowMinimize(); QVERIFY(!c->isShown(true)); - QEXPECT_FAIL("wlShell", "BUG 368673", Continue); QVERIFY(c->wantsInput()); - QEXPECT_FAIL("wlShell", "BUG 368673", Continue); QVERIFY(c->wantsTabFocus()); QVERIFY(!c->isActive()); QVERIFY(!workspace()->activeClient()); diff --git a/shell_client.cpp b/shell_client.cpp index 25507c3b10..d11800862e 100644 --- a/shell_client.cpp +++ b/shell_client.cpp @@ -807,12 +807,19 @@ bool ShellClient::acceptsFocus() const return false; } } + if (m_closing) { + // a closing window does not accept focus + return false; + } + if (m_unmapped) { + // an unmapped window does not accept focus + return false; + } if (m_shellSurface) { if (m_shellSurface->isPopup()) { return false; } - // if the window is not visible it doesn't get input - return m_shellSurface->acceptsKeyboardFocus() && isShown(true); + return m_shellSurface->acceptsKeyboardFocus(); } if (m_xdgShellSurface) { // TODO: proper