diff --git a/shell_client.cpp b/shell_client.cpp index 563b510a2f..8078a78eec 100644 --- a/shell_client.cpp +++ b/shell_client.cpp @@ -147,7 +147,7 @@ NET::WindowType ShellClient::windowType(bool direct, int supported_types) const // TODO: implement Q_UNUSED(direct) Q_UNUSED(supported_types) - return NET::Normal; + return m_windowType; } double ShellClient::opacity() const @@ -420,6 +420,13 @@ void ShellClient::findInternalWindow() m_internalWindow = w; connect(m_internalWindow, &QWindow::xChanged, this, &ShellClient::updateInternalWindowGeometry); connect(m_internalWindow, &QWindow::yChanged, this, &ShellClient::updateInternalWindowGeometry); + + // Try reading the window type from the QWindow. PlasmaCore.Dialog provides a dynamic type property + // let's check whether it exists, if it does it's our window type + const QVariant windowType = m_internalWindow->property("type"); + if (!windowType.isNull()) { + m_windowType = static_cast(windowType.toInt()); + } return; } } diff --git a/shell_client.h b/shell_client.h index 49ebfa65ad..19c343c9e4 100644 --- a/shell_client.h +++ b/shell_client.h @@ -129,6 +129,7 @@ private: bool m_unmapped = true; MaximizeMode m_maximizeMode = MaximizeRestore; QRect m_geomMaximizeRestore; // size and position of the window before it was set to maximize + NET::WindowType m_windowType = NET::Normal; }; }