summaryrefslogtreecommitdiffstats
path: root/src/compositor/compositor_api/qwaylandsurface.h
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@theqtcompany.com>2015-07-30 12:05:12 +0200
committerJørgen Lind <jorgen.lind@theqtcompany.com>2015-08-28 13:09:41 +0200
commitab6980d57609b1e4bdb164d3413faa2f7cb7e1e4 (patch)
treeef68f66511347c0545559df6a81b6d56c6448eb4 /src/compositor/compositor_api/qwaylandsurface.h
parente88c2f37097901e228de70c62a0220386038a51a (diff)
Move the output from QWaylandSurface to the QWaylandSurfaceView
and add a property called primaryOutput on the QWaylandSurface. Also add some bookkeeping in QtWayland::Output so it knows what surfaces and views it currently holds, sending the enter and leave events automatically. Change-Id: Ib6efbc6f8157657fb4451b751bba1cb5345b7906
Diffstat (limited to 'src/compositor/compositor_api/qwaylandsurface.h')
-rw-r--r--src/compositor/compositor_api/qwaylandsurface.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/compositor/compositor_api/qwaylandsurface.h b/src/compositor/compositor_api/qwaylandsurface.h
index 9dce15a6b..5aa4232b2 100644
--- a/src/compositor/compositor_api/qwaylandsurface.h
+++ b/src/compositor/compositor_api/qwaylandsurface.h
@@ -113,7 +113,7 @@ class Q_COMPOSITOR_EXPORT QWaylandSurface : public QObject
Q_PROPERTY(QWindow::Visibility visibility READ visibility WRITE setVisibility NOTIFY visibilityChanged)
Q_PROPERTY(QWaylandSurface *transientParent READ transientParent)
Q_PROPERTY(QPointF transientOffset READ transientOffset)
- Q_PROPERTY(QWaylandOutput *output READ output NOTIFY outputChanged)
+ Q_PROPERTY(QWaylandOutput *primaryOutput READ primaryOutput WRITE setPrimaryOutput NOTIFY primaryOutputChanged)
Q_PROPERTY(QWaylandSurface::Origin origin READ origin NOTIFY originChanged);
Q_ENUMS(WindowFlag WindowType)
@@ -179,10 +179,8 @@ public:
QWaylandCompositor *compositor() const;
- QWaylandOutput *mainOutput() const;
- void setMainOutput(QWaylandOutput *mainOutput);
-
- QList<QWaylandOutput *> outputs() const;
+ QWaylandOutput *primaryOutput() const;
+ void setPrimaryOutput(QWaylandOutput *output);
QString className() const;
@@ -211,6 +209,9 @@ public:
static QWaylandSurface *fromResource(::wl_resource *resource);
+ void enter(QWaylandOutput *output);
+ void leave(QWaylandOutput *output);
+
public Q_SLOTS:
void updateSelection();
@@ -238,7 +239,7 @@ Q_SIGNALS:
void pong();
void surfaceDestroyed();
void shellViewCreated();
- void outputChanged(QWaylandOutput *newOutput, QWaylandOutput *oldOutput);
+ void primaryOutputChanged(QWaylandOutput *newOutput, QWaylandOutput *oldOutput);
void originChanged();
void configure(bool hasBuffer);