Skip to content

Commit a5ed9a2

Browse files
authored
Merge pull request #1 from Henry-Denny/fix/version-guard-for-clientArea
Guard clientArea function declaration by KWin version
2 parents 8b17c62 + 10a2237 commit a5ed9a2

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/plugin/KandoKWinIntegrationPlugin.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
#include "KandoKWinIntegrationPlugin.h"
1212

13+
#include <config-kwin.h>
1314
#include <effect/effecthandler.h>
1415
#include <effect/effectwindow.h>
1516

@@ -56,8 +57,12 @@ QVariantMap KandoKWinIntegrationPlugin::getWMInfo() const {
5657
const auto windowName = activeWindow ? activeWindow->caption() : QString();
5758
const auto appName = activeWindow ? activeWindow->windowClass() : QString();
5859

60+
#if (PROJECT_VERSION_MAJOR >= 6) && (PROJECT_VERSION_MINOR >= 7)
61+
QRectF workArea = KWin::effects->clientArea(KWin::MaximizeArea, pointerPos.toPoint());
62+
#else
5963
QRectF workArea =
6064
KWin::effects->clientArea(KWin::MaximizeArea, pointerPos.toPoint(), nullptr);
65+
#endif
6166

6267
return {
6368
{QStringLiteral("windowName"), windowName},

0 commit comments

Comments
 (0)