diff --git a/autotests/integration/shell_client_test.cpp b/autotests/integration/shell_client_test.cpp --- a/autotests/integration/shell_client_test.cpp +++ b/autotests/integration/shell_client_test.cpp @@ -276,9 +276,7 @@ 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 --- a/shell_client.cpp +++ b/shell_client.cpp @@ -807,12 +807,19 @@ 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