window: expose "output" property
This allows it to be used from QML KWin Script or via property() C++ call. This is useful to be able to use client area function with pointers API without falling back to VirtualDesktop X11 ids from scripts.
This commit is contained in:
parent
6982c506a5
commit
f6054863e1
1 changed files with 11 additions and 1 deletions
12
src/window.h
12
src/window.h
|
@ -121,7 +121,17 @@ class KWIN_EXPORT Window : public QObject
|
|||
|
||||
Q_PROPERTY(QRectF visibleRect READ visibleGeometry)
|
||||
Q_PROPERTY(qreal opacity READ opacity WRITE setOpacity NOTIFY opacityChanged)
|
||||
|
||||
/**
|
||||
* The screen where the window center is on
|
||||
*/
|
||||
Q_PROPERTY(int screen READ screen NOTIFY screenChanged)
|
||||
|
||||
/**
|
||||
* The output (screen) where the window center is on
|
||||
*/
|
||||
Q_PROPERTY(KWin::Output *output READ output NOTIFY screenChanged)
|
||||
|
||||
Q_PROPERTY(qulonglong windowId READ window CONSTANT)
|
||||
|
||||
Q_PROPERTY(QRectF rect READ rect)
|
||||
|
@ -631,7 +641,7 @@ public:
|
|||
qreal height() const;
|
||||
bool isOnOutput(Output *output) const;
|
||||
bool isOnActiveOutput() const;
|
||||
int screen() const; // the screen where the center is
|
||||
int screen() const;
|
||||
Output *output() const;
|
||||
void setOutput(Output *output);
|
||||
virtual QPointF clientPos() const
|
||||
|
|
Loading…
Reference in a new issue