From 356b406ae34d9ae99040bec41f4f59bb5a7d4066 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Sun, 19 Feb 2012 15:42:18 +0100 Subject: [PATCH] Export screen information to scripts --- scripting/workspace_wrapper.cpp | 2 ++ scripting/workspace_wrapper.h | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/scripting/workspace_wrapper.cpp b/scripting/workspace_wrapper.cpp index da84eb1a39..86f98966d7 100644 --- a/scripting/workspace_wrapper.cpp +++ b/scripting/workspace_wrapper.cpp @@ -63,6 +63,8 @@ GETTER(int, workspaceHeight) GETTER(QSize, desktopGridSize) GETTER(int, desktopGridWidth) GETTER(int, desktopGridHeight) +GETTER(int, activeScreen) +GETTER(int, numScreens) #undef GETTER diff --git a/scripting/workspace_wrapper.h b/scripting/workspace_wrapper.h index 8c502a92cf..d8700a37ad 100644 --- a/scripting/workspace_wrapper.h +++ b/scripting/workspace_wrapper.h @@ -60,6 +60,8 @@ class WorkspaceWrapper : public QObject * The height of the display, that is height of all combined screens. **/ Q_PROPERTY(int displayHeight READ displayHeight) + Q_PROPERTY(int activeScreen READ activeScreen) + Q_PROPERTY(int numScreens READ numScreens) private: Q_DISABLE_COPY(WorkspaceWrapper) @@ -125,6 +127,8 @@ void setter( rettype val ); int displayWidth() const; int displayHeight() const; QSize displaySize() const; + int activeScreen() const; + int numScreens() const; Q_INVOKABLE QList< KWin::Client* > clientList() const; /**