summaryrefslogtreecommitdiffstats
path: root/src/compositor/extensions/qwaylandxdgshell.h
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2018-08-13 16:18:47 +0200
committerPaul Olav Tvete <paul.tvete@qt.io>2018-08-17 14:41:05 +0000
commit845839b971f6af017be77dbe1ee1541453d12c23 (patch)
tree4289e0aa931cf95586e088620bb508b17f5e26f9 /src/compositor/extensions/qwaylandxdgshell.h
parent53d7bffef7fd7f2e1026ac54e5c8bdb3df761208 (diff)
Compositor API: Add xdg-decoration unstable v1 support
And add an example with server-side window decorations. Task-number: QTBUG-69934 Change-Id: Ic3984b50cf7574cae5135dea51eb4b1c80bb45a7 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'src/compositor/extensions/qwaylandxdgshell.h')
-rw-r--r--src/compositor/extensions/qwaylandxdgshell.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/compositor/extensions/qwaylandxdgshell.h b/src/compositor/extensions/qwaylandxdgshell.h
index 5467290f6..bcc316e85 100644
--- a/src/compositor/extensions/qwaylandxdgshell.h
+++ b/src/compositor/extensions/qwaylandxdgshell.h
@@ -150,6 +150,7 @@ class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandXdgToplevel : public QObject
Q_PROPERTY(bool fullscreen READ fullscreen NOTIFY fullscreenChanged)
Q_PROPERTY(bool resizing READ resizing NOTIFY resizingChanged)
Q_PROPERTY(bool activated READ activated NOTIFY activatedChanged)
+ Q_PROPERTY(enum DecorationMode decorationMode READ decorationMode NOTIFY decorationModeChanged)
public:
enum State : uint {
MaximizedState = 1,
@@ -159,6 +160,13 @@ public:
};
Q_ENUM(State)
+ enum DecorationMode {
+ DefaultDecorationMode,
+ ClientSideDecoration,
+ ServerSideDecoration,
+ };
+ Q_ENUM(DecorationMode)
+
QWaylandXdgToplevel(QWaylandXdgSurface *xdgSurface, QWaylandResource &resource);
QWaylandXdgToplevel *parentToplevel() const;
@@ -172,6 +180,7 @@ public:
bool fullscreen() const;
bool resizing() const;
bool activated() const;
+ DecorationMode decorationMode() const;
Q_INVOKABLE QSize sizeForResize(const QSizeF &size, const QPointF &delta, Qt::Edges edges) const;
uint sendConfigure(const QSize &size, const QVector<State> &states);
@@ -206,6 +215,8 @@ Q_SIGNALS:
void unsetFullscreen();
void setMinimized();
+ void decorationModeChanged();
+
private:
QList<int> statesAsInts() const;
};