Commit 3ce73d56 authored by David Faure's avatar David Faure

kwayland-integration: fix compilation with no-deprecated build of kwindowsystem

I build kwindowsystem with -DEXCLUDE_DEPRECATED_BEFORE_AND_AT=5.62.0,
and this broke here. Use the exact same condition as the one around
those virtual methods in the base class.
parent faccad8e
......@@ -148,12 +148,14 @@ QPoint WindowSystem::desktopToViewport(int desktop, bool absolute)
return QPoint();
}
#if KWINDOWSYSTEM_BUILD_DEPRECATED_SINCE(5, 0)
WId WindowSystem::groupLeader(WId window)
{
Q_UNUSED(window)
qCDebug(KWAYLAND_KWS) << "This plugin does not support group leader";
return 0;
}
#endif
bool WindowSystem::icccmCompliantMappingState()
{
......@@ -491,12 +493,14 @@ QList< WId > WindowSystem::stackingOrder()
return ret;
}
#if KWINDOWSYSTEM_BUILD_DEPRECATED_SINCE(5, 0)
WId WindowSystem::transientFor(WId window)
{
Q_UNUSED(window)
qCDebug(KWAYLAND_KWS) << "This plugin does not support transient for windows";
return 0;
}
#endif
int WindowSystem::viewportToDesktop(const QPoint &pos)
{
......
......@@ -34,6 +34,15 @@ class PlasmaShell;
}
}
// Compat with KF < 5.64
#ifndef KWINDOWSYSTEM_BUILD_DEPRECATED_SINCE
#ifndef KWINDOWSYSTEM_NO_DEPRECATED
#define KWINDOWSYSTEM_BUILD_DEPRECATED_SINCE(x, y) 1
#else
#define KWINDOWSYSTEM_BUILD_DEPRECATED_SINCE(x, y) 0
#endif
#endif
class WindowSystem : public QObject, public KWindowSystemPrivate
{
Q_OBJECT
......@@ -52,7 +61,7 @@ public:
void setOnAllDesktops(WId win, bool b) override;
void setOnDesktop(WId win, int desktop) override;
void setOnActivities(WId win, const QStringList &activities) override;
#ifndef KWINDOWSYSTEM_NO_DEPRECATED
#if KWINDOWSYSTEM_BUILD_DEPRECATED_SINCE(5, 0)
WId transientFor(WId window) override;
WId groupLeader(WId window) override;
#endif
......
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