Deal with QXcbWindowFunctions being gone in Qt6

This uses the same magic property approach as KCompletion and
Plasma Frameworks use instead.
wilder-5.25
Volker Krause 4 years ago
parent 143f946ba6
commit aed2855844
  1. 6
      shell/panelview.cpp

@ -36,6 +36,7 @@
#include <NETWM>
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
#include <private/qtx11extras_p.h>
#include <qpa/qplatformwindow_p.h>
#else
#include <QX11Info>
#include <QtPlatformHeaders/QXcbWindowFunctions>
@ -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);

Loading…
Cancel
Save