mirror of
https://github.com/Bismuth-Forge/bismuth.git
synced 2024-09-11 00:15:37 +03:00
refactor: port desktops workspace function
This commit is contained in:
parent
aa4504e32a
commit
c06c840b29
@ -39,6 +39,7 @@ public:
|
||||
|
||||
BI_PROPERTY(int, currentDesktop, setCurrentDesktop);
|
||||
BI_PROPERTY(QString, currentActivity, setCurrentActivity);
|
||||
BI_PROPERTY(int, desktops, setDesktops);
|
||||
|
||||
/**
|
||||
* Returns the geometry a Client can use with the specified option.
|
||||
|
@ -70,7 +70,6 @@ export class DriverImpl implements Driver {
|
||||
this.proxy.workspace().currentActivity,
|
||||
this.proxy.workspace().currentDesktop,
|
||||
this.qml.activityInfo,
|
||||
this.kwinApi,
|
||||
this.config,
|
||||
this.proxy
|
||||
);
|
||||
@ -110,7 +109,6 @@ export class DriverImpl implements Driver {
|
||||
this.proxy.workspace().currentActivity,
|
||||
this.proxy.workspace().currentDesktop,
|
||||
this.qml.activityInfo,
|
||||
this.kwinApi,
|
||||
this.config,
|
||||
this.proxy
|
||||
)
|
||||
@ -157,7 +155,6 @@ export class DriverImpl implements Driver {
|
||||
new DriverWindowImpl(
|
||||
client,
|
||||
this.qml,
|
||||
this.kwinApi,
|
||||
this.config,
|
||||
this.log,
|
||||
this.proxy
|
||||
@ -182,7 +179,6 @@ export class DriverImpl implements Driver {
|
||||
this.proxy.workspace().currentActivity,
|
||||
this.proxy.workspace().currentDesktop,
|
||||
this.qml.activityInfo,
|
||||
this.kwinApi,
|
||||
this.config,
|
||||
this.proxy
|
||||
);
|
||||
|
@ -44,7 +44,6 @@ export class DriverSurfaceImpl implements DriverSurface {
|
||||
public readonly activity: string,
|
||||
public readonly desktop: number,
|
||||
private activityInfo: Plasma.TaskManager.ActivityInfo,
|
||||
private kwinApi: KWin.Api,
|
||||
private config: Config,
|
||||
private proxy: TSProxy
|
||||
) {
|
||||
@ -66,7 +65,7 @@ export class DriverSurfaceImpl implements DriverSurface {
|
||||
|
||||
public next(): DriverSurface | null {
|
||||
// This is the last virtual desktop
|
||||
if (this.desktop === this.kwinApi.workspace.desktops) {
|
||||
if (this.desktop === this.proxy.workspace().desktops) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -75,7 +74,6 @@ export class DriverSurfaceImpl implements DriverSurface {
|
||||
this.activity,
|
||||
this.desktop + 1,
|
||||
this.activityInfo,
|
||||
this.kwinApi,
|
||||
this.config,
|
||||
this.proxy
|
||||
);
|
||||
|
@ -181,7 +181,6 @@ export class DriverWindowImpl implements DriverWindow {
|
||||
activity,
|
||||
desktop,
|
||||
this.qml.activityInfo,
|
||||
this.kwinApi,
|
||||
this.config,
|
||||
this.proxy
|
||||
);
|
||||
@ -205,14 +204,12 @@ export class DriverWindowImpl implements DriverWindow {
|
||||
*
|
||||
* @param client the client the window represents
|
||||
* @param qml root qml object of the script
|
||||
* @param kwinApi
|
||||
* @param config
|
||||
* @param log
|
||||
*/
|
||||
constructor(
|
||||
public readonly client: KWin.Client,
|
||||
private qml: Bismuth.Qml.Main,
|
||||
private kwinApi: KWin.Api,
|
||||
private config: Config,
|
||||
private log: Log,
|
||||
private proxy: TSProxy
|
||||
|
Loading…
Reference in New Issue
Block a user