mirror of
https://github.com/Bismuth-Forge/bismuth.git
synced 2024-09-17 11:37:10 +03:00
refactor: put currentDesktop API into use
This commit is contained in:
parent
23eb425181
commit
eb9d989a3a
@ -3,14 +3,15 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#define BI_READ_ONLY_PROPERTY(TYPE, NAME) \
|
||||
#include <QObject>
|
||||
|
||||
#define BI_PROPERTY(TYPE, NAME, SETTER_NAME) \
|
||||
Q_PROPERTY(TYPE NAME READ NAME WRITE SETTER_NAME); \
|
||||
\
|
||||
TYPE NAME() const \
|
||||
{ \
|
||||
return m_kwinImpl->property(#NAME).value<TYPE>(); \
|
||||
}
|
||||
|
||||
#define BI_PROPERTY(TYPE, NAME, SETTER_NAME) \
|
||||
BI_READ_ONLY_PROPERTY(TYPE, NAME) \
|
||||
} \
|
||||
\
|
||||
void SETTER_NAME(const TYPE &value) \
|
||||
{ \
|
||||
|
@ -68,7 +68,7 @@ export class DriverImpl implements Driver {
|
||||
? this.kwinApi.workspace.activeClient.screen
|
||||
: 0,
|
||||
this.kwinApi.workspace.currentActivity,
|
||||
this.kwinApi.workspace.currentDesktop,
|
||||
this.proxy.workspace().currentDesktop,
|
||||
this.qml.activityInfo,
|
||||
this.kwinApi,
|
||||
this.config,
|
||||
@ -83,8 +83,8 @@ export class DriverImpl implements Driver {
|
||||
// TODO: focusing window on other screen?
|
||||
// TODO: find a way to change activity
|
||||
|
||||
if (this.kwinApi.workspace.currentDesktop !== kwinSurface.desktop) {
|
||||
this.kwinApi.workspace.currentDesktop = kwinSurface.desktop;
|
||||
if (this.proxy.workspace().currentDesktop !== kwinSurface.desktop) {
|
||||
this.proxy.workspace().currentDesktop = kwinSurface.desktop;
|
||||
}
|
||||
}
|
||||
|
||||
@ -108,7 +108,7 @@ export class DriverImpl implements Driver {
|
||||
new DriverSurfaceImpl(
|
||||
screen,
|
||||
this.kwinApi.workspace.currentActivity,
|
||||
this.kwinApi.workspace.currentDesktop,
|
||||
this.proxy.workspace().currentDesktop,
|
||||
this.qml.activityInfo,
|
||||
this.kwinApi,
|
||||
this.config,
|
||||
@ -180,7 +180,7 @@ export class DriverImpl implements Driver {
|
||||
const srf = new DriverSurfaceImpl(
|
||||
screen,
|
||||
this.kwinApi.workspace.currentActivity,
|
||||
this.kwinApi.workspace.currentDesktop,
|
||||
this.proxy.workspace().currentDesktop,
|
||||
this.qml.activityInfo,
|
||||
this.kwinApi,
|
||||
this.config,
|
||||
@ -276,7 +276,7 @@ export class DriverImpl implements Driver {
|
||||
onCurrentActivityChanged
|
||||
);
|
||||
this.connect(
|
||||
this.kwinApi.workspace.currentDesktopChanged,
|
||||
this.proxy.workspace().currentDesktopChanged,
|
||||
onCurrentDesktopChanged
|
||||
);
|
||||
this.connect(this.kwinApi.workspace.clientAdded, onClientAdded);
|
||||
|
@ -174,7 +174,7 @@ export class DriverWindowImpl implements DriverWindow {
|
||||
const desktop =
|
||||
this.client.desktop >= 0
|
||||
? this.client.desktop
|
||||
: this.kwinApi.workspace.currentDesktop;
|
||||
: this.proxy.workspace().currentDesktop;
|
||||
|
||||
return new DriverSurfaceImpl(
|
||||
this.client.screen,
|
||||
@ -281,7 +281,7 @@ export class DriverWindowImpl implements DriverWindow {
|
||||
.clientArea(
|
||||
this.kwinApi.KWin.PlacementArea,
|
||||
this.client.screen,
|
||||
this.kwinApi.workspace.currentDesktop
|
||||
this.proxy.workspace().currentDesktop
|
||||
)
|
||||
);
|
||||
if (!area.includes(geometry)) {
|
||||
|
Loading…
Reference in New Issue
Block a user