From aed2855844ff4e7d287ae405c6c4f2f2f348a8a3 Mon Sep 17 00:00:00 2001 From: Volker Krause Date: Tue, 15 Mar 2022 18:43:01 +0100 Subject: [PATCH] Deal with QXcbWindowFunctions being gone in Qt6 This uses the same magic property approach as KCompletion and Plasma Frameworks use instead. --- shell/panelview.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/shell/panelview.cpp b/shell/panelview.cpp index b1967359f..283133913 100644 --- a/shell/panelview.cpp +++ b/shell/panelview.cpp @@ -36,6 +36,7 @@ #include #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) #include +#include #else #include #include @@ -842,7 +843,12 @@ void PanelView::integrateScreen() KWindowSystem::setOnAllDesktops(winId(), true); KWindowSystem::setType(winId(), NET::Dock); #if HAVE_X11 +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) QXcbWindowFunctions::setWmWindowType(this, QXcbWindowFunctions::Dock); +#else + // QXcbWindow isn't installed and thus inaccessible to us, but it does read this magic property... + setProperty("_q_xcb_wm_window_type", QNativeInterface::Private::QXcbWindow::Dock); +#endif #endif if (m_shellSurface) { m_shellSurface->setRole(KWayland::Client::PlasmaShellSurface::Role::Panel);