Members of the KDE Community are recommended to subscribe to the kde-community mailing list at to allow them to participate in important discussions and receive other important announcements

Commit 6b3e55d6 authored by Martin Flöser's avatar Martin Flöser

Implement isPopupWindow for internal windows

Just accessing Qt::Popup WindowFlag.

BUG: 402852

Test Plan: Not tested for the described problematic case

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision:
parent bedd8582
......@@ -63,6 +63,7 @@ private Q_SLOTS:
void testSkipCloseAnimation();
void testModifierClickUnrestrictedMove();
void testModifierScroll();
void testPopup();
class HelperWindow : public QRasterWindow
......@@ -671,6 +672,21 @@ void InternalWindowTest::testModifierScroll()
kwinApp()->platform()->keyboardKeyReleased(KEY_LEFTALT, timestamp++);
void InternalWindowTest::testPopup()
QSignalSpy clientAddedSpy(waylandServer(), &WaylandServer::shellClientAdded);
HelperWindow win;
win.setGeometry(0, 0, 100, 100);
win.setFlags(win.flags() | Qt::Popup);;
QCOMPARE(clientAddedSpy.count(), 1);
auto internalClient = clientAddedSpy.first().first().value<ShellClient*>();
QCOMPARE(internalClient->isPopupWindow(), true);
......@@ -1982,6 +1982,9 @@ bool ShellClient::isPopupWindow() const
if (Toplevel::isPopupWindow()) {
return true;
if (isInternal() && m_internalWindow) {
return m_internalWindow->flags().testFlag(Qt::Popup);
if (m_shellSurface != nullptr) {
return m_shellSurface->isPopup();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment