refactor: port activeScreens property

This commit is contained in:
Mikhail Zolotukhin 2022-03-25 16:05:52 +03:00 committed by Genda
parent 2a3be3a901
commit b5e29933d1
2 changed files with 3 additions and 4 deletions

View File

@ -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.

View File

@ -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,