diff --git a/autotests/integration/internal_window.cpp b/autotests/integration/internal_window.cpp --- a/autotests/integration/internal_window.cpp +++ b/autotests/integration/internal_window.cpp @@ -63,6 +63,7 @@ void testSkipCloseAnimation(); void testModifierClickUnrestrictedMove(); void testModifierScroll(); + void testPopup(); }; class HelperWindow : public QRasterWindow @@ -671,6 +672,21 @@ kwinApp()->platform()->keyboardKeyReleased(KEY_LEFTALT, timestamp++); } +void InternalWindowTest::testPopup() +{ + QSignalSpy clientAddedSpy(waylandServer(), &WaylandServer::shellClientAdded); + QVERIFY(clientAddedSpy.isValid()); + HelperWindow win; + win.setGeometry(0, 0, 100, 100); + win.setFlags(win.flags() | Qt::Popup); + win.show(); + QVERIFY(clientAddedSpy.wait()); + QCOMPARE(clientAddedSpy.count(), 1); + auto internalClient = clientAddedSpy.first().first().value(); + QVERIFY(internalClient); + QCOMPARE(internalClient->isPopupWindow(), true); +} + } WAYLANDTEST_MAIN(KWin::InternalWindowTest) diff --git a/shell_client.cpp b/shell_client.cpp --- a/shell_client.cpp +++ b/shell_client.cpp @@ -1982,6 +1982,9 @@ if (Toplevel::isPopupWindow()) { return true; } + if (isInternal() && m_internalWindow) { + return m_internalWindow->flags().testFlag(Qt::Popup); + } if (m_shellSurface != nullptr) { return m_shellSurface->isPopup(); }