diff --git a/src/core/plasma-api/workspace.hpp b/src/core/plasma-api/workspace.hpp index da2332ba..fd1168f1 100644 --- a/src/core/plasma-api/workspace.hpp +++ b/src/core/plasma-api/workspace.hpp @@ -37,10 +37,11 @@ public: Workspace(QQmlEngine *engine); Workspace(const Workspace &); + BI_READONLY_PROPERTY(int, numScreens); + BI_READONLY_PROPERTY(int, activeScreen); BI_PROPERTY(int, currentDesktop, setCurrentDesktop); BI_PROPERTY(QString, currentActivity, setCurrentActivity); BI_PROPERTY(int, desktops, setDesktops); - BI_READONLY_PROPERTY(int, numScreens); /** * Returns the geometry a Client can use with the specified option. diff --git a/src/kwinscript/driver/index.ts b/src/kwinscript/driver/index.ts index 1856328d..67d8af3c 100644 --- a/src/kwinscript/driver/index.ts +++ b/src/kwinscript/driver/index.ts @@ -64,9 +64,7 @@ export interface Driver { export class DriverImpl implements Driver { public get currentSurface(): DriverSurface { return new DriverSurfaceImpl( - this.kwinApi.workspace.activeClient - ? this.kwinApi.workspace.activeClient.screen - : 0, + this.proxy.workspace().activeScreen, this.proxy.workspace().currentActivity, this.proxy.workspace().currentDesktop, this.qml.activityInfo,