refactor: port desktops workspace function

This commit is contained in:
Mikhail Zolotukhin 2022-03-24 23:25:53 +03:00 committed by Genda
parent aa4504e32a
commit c06c840b29
4 changed files with 2 additions and 10 deletions

View File

@ -39,6 +39,7 @@ public:
BI_PROPERTY(int, currentDesktop, setCurrentDesktop); BI_PROPERTY(int, currentDesktop, setCurrentDesktop);
BI_PROPERTY(QString, currentActivity, setCurrentActivity); BI_PROPERTY(QString, currentActivity, setCurrentActivity);
BI_PROPERTY(int, desktops, setDesktops);
/** /**
* Returns the geometry a Client can use with the specified option. * Returns the geometry a Client can use with the specified option.

View File

@ -70,7 +70,6 @@ export class DriverImpl implements Driver {
this.proxy.workspace().currentActivity, this.proxy.workspace().currentActivity,
this.proxy.workspace().currentDesktop, this.proxy.workspace().currentDesktop,
this.qml.activityInfo, this.qml.activityInfo,
this.kwinApi,
this.config, this.config,
this.proxy this.proxy
); );
@ -110,7 +109,6 @@ export class DriverImpl implements Driver {
this.proxy.workspace().currentActivity, this.proxy.workspace().currentActivity,
this.proxy.workspace().currentDesktop, this.proxy.workspace().currentDesktop,
this.qml.activityInfo, this.qml.activityInfo,
this.kwinApi,
this.config, this.config,
this.proxy this.proxy
) )
@ -157,7 +155,6 @@ export class DriverImpl implements Driver {
new DriverWindowImpl( new DriverWindowImpl(
client, client,
this.qml, this.qml,
this.kwinApi,
this.config, this.config,
this.log, this.log,
this.proxy this.proxy
@ -182,7 +179,6 @@ export class DriverImpl implements Driver {
this.proxy.workspace().currentActivity, this.proxy.workspace().currentActivity,
this.proxy.workspace().currentDesktop, this.proxy.workspace().currentDesktop,
this.qml.activityInfo, this.qml.activityInfo,
this.kwinApi,
this.config, this.config,
this.proxy this.proxy
); );

View File

@ -44,7 +44,6 @@ export class DriverSurfaceImpl implements DriverSurface {
public readonly activity: string, public readonly activity: string,
public readonly desktop: number, public readonly desktop: number,
private activityInfo: Plasma.TaskManager.ActivityInfo, private activityInfo: Plasma.TaskManager.ActivityInfo,
private kwinApi: KWin.Api,
private config: Config, private config: Config,
private proxy: TSProxy private proxy: TSProxy
) { ) {
@ -66,7 +65,7 @@ export class DriverSurfaceImpl implements DriverSurface {
public next(): DriverSurface | null { public next(): DriverSurface | null {
// This is the last virtual desktop // This is the last virtual desktop
if (this.desktop === this.kwinApi.workspace.desktops) { if (this.desktop === this.proxy.workspace().desktops) {
return null; return null;
} }
@ -75,7 +74,6 @@ export class DriverSurfaceImpl implements DriverSurface {
this.activity, this.activity,
this.desktop + 1, this.desktop + 1,
this.activityInfo, this.activityInfo,
this.kwinApi,
this.config, this.config,
this.proxy this.proxy
); );

View File

@ -181,7 +181,6 @@ export class DriverWindowImpl implements DriverWindow {
activity, activity,
desktop, desktop,
this.qml.activityInfo, this.qml.activityInfo,
this.kwinApi,
this.config, this.config,
this.proxy this.proxy
); );
@ -205,14 +204,12 @@ export class DriverWindowImpl implements DriverWindow {
* *
* @param client the client the window represents * @param client the client the window represents
* @param qml root qml object of the script * @param qml root qml object of the script
* @param kwinApi
* @param config * @param config
* @param log * @param log
*/ */
constructor( constructor(
public readonly client: KWin.Client, public readonly client: KWin.Client,
private qml: Bismuth.Qml.Main, private qml: Bismuth.Qml.Main,
private kwinApi: KWin.Api,
private config: Config, private config: Config,
private log: Log, private log: Log,
private proxy: TSProxy private proxy: TSProxy