diff --git a/plugins/windowsystem/windowsystem.cpp b/plugins/windowsystem/windowsystem.cpp index df4c55388c..b73ac62ac5 100644 --- a/plugins/windowsystem/windowsystem.cpp +++ b/plugins/windowsystem/windowsystem.cpp @@ -107,7 +107,7 @@ QPoint WindowSystem::desktopToViewport(int desktop, bool absolute) return QPoint(); } -#ifndef KWINDOWSYSTEM_NO_DEPRECATED +#if KWINDOWSYSTEM_BUILD_DEPRECATED_SINCE(5, 0) WId WindowSystem::groupLeader(WId window) { Q_UNUSED(window) @@ -287,7 +287,7 @@ QList< WId > WindowSystem::stackingOrder() return {}; } -#ifndef KWINDOWSYSTEM_NO_DEPRECATED +#if KWINDOWSYSTEM_BUILD_DEPRECATED_SINCE(5, 0) WId WindowSystem::transientFor(WId window) { Q_UNUSED(window) diff --git a/plugins/windowsystem/windowsystem.h b/plugins/windowsystem/windowsystem.h index f2abf5c437..1e97ab3d69 100644 --- a/plugins/windowsystem/windowsystem.h +++ b/plugins/windowsystem/windowsystem.h @@ -23,6 +23,15 @@ #include +// 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 + namespace KWin { @@ -44,7 +53,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