mirror of
https://github.com/Bismuth-Forge/bismuth.git
synced 2024-09-11 00:15:37 +03:00
refactor: port numScreens property
This commit is contained in:
parent
c06c840b29
commit
2a3be3a901
@ -18,6 +18,14 @@
|
||||
m_kwinImpl->setProperty(#NAME, QVariant::fromValue(value)); \
|
||||
}
|
||||
|
||||
#define BI_READONLY_PROPERTY(TYPE, NAME) \
|
||||
Q_PROPERTY(TYPE NAME READ NAME); \
|
||||
\
|
||||
TYPE NAME() const \
|
||||
{ \
|
||||
return m_kwinImpl->property(#NAME).value<TYPE>(); \
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrap QML API method
|
||||
*
|
||||
|
@ -40,6 +40,7 @@ public:
|
||||
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.
|
||||
|
@ -102,7 +102,7 @@ export class DriverImpl implements Driver {
|
||||
|
||||
public get screens(): DriverSurface[] {
|
||||
const screensArr = [];
|
||||
for (let screen = 0; screen < this.kwinApi.workspace.numScreens; screen++) {
|
||||
for (let screen = 0; screen < this.proxy.workspace().numScreens; screen++) {
|
||||
screensArr.push(
|
||||
new DriverSurfaceImpl(
|
||||
screen,
|
||||
|
Loading…
Reference in New Issue
Block a user