summaryrefslogtreecommitdiffstats
path: root/src/compositor/extensions/qwaylandxdgshell.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/compositor/extensions/qwaylandxdgshell.h')
-rw-r--r--src/compositor/extensions/qwaylandxdgshell.h50
1 files changed, 36 insertions, 14 deletions
diff --git a/src/compositor/extensions/qwaylandxdgshell.h b/src/compositor/extensions/qwaylandxdgshell.h
index c11ca1f3a..4a1ec5d06 100644
--- a/src/compositor/extensions/qwaylandxdgshell.h
+++ b/src/compositor/extensions/qwaylandxdgshell.h
@@ -55,7 +55,7 @@ class QWaylandXdgPopupPrivate;
class QWaylandSurface;
class QWaylandSurfaceRole;
-class QWaylandInputDevice;
+class QWaylandSeat;
class QWaylandOutput;
class QWaylandClient;
@@ -77,14 +77,14 @@ public Q_SLOTS:
void closeAllPopups();
Q_SIGNALS:
- void createXdgSurface(QWaylandSurface *surface, const QWaylandResource &resource);
+ void xdgSurfaceRequested(QWaylandSurface *surface, const QWaylandResource &resource);
void xdgSurfaceCreated(QWaylandXdgSurface *xdgSurface);
void xdgPopupCreated(QWaylandXdgPopup *xdgPopup);
- void createXdgPopup(QWaylandSurface *surface, QWaylandSurface *parent, QWaylandInputDevice *seat, const QPoint &position, const QWaylandResource &resource);
+ void xdgPopupRequested(QWaylandSurface *surface, QWaylandSurface *parent, QWaylandSeat *seat, const QPoint &position, const QWaylandResource &resource);
void pong(uint serial);
private Q_SLOTS:
- void handleDefaultInputDeviceChanged(QWaylandInputDevice *newDevice, QWaylandInputDevice *oldDevice);
+ void handleSeatChanged(QWaylandSeat *newSeat, QWaylandSeat *oldSeat);
void handleFocusChanged(QWaylandSurface *newSurface, QWaylandSurface *oldSurface);
};
@@ -93,6 +93,7 @@ class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandXdgSurface : public QWaylandShellSurfa
{
Q_OBJECT
Q_DECLARE_PRIVATE(QWaylandXdgSurface)
+ Q_PROPERTY(QWaylandXdgShell *shell READ shell NOTIFY shellChanged)
Q_PROPERTY(QWaylandSurface *surface READ surface NOTIFY surfaceChanged)
Q_PROPERTY(QWaylandXdgSurface *parentSurface READ parentSurface NOTIFY parentSurfaceChanged)
Q_PROPERTY(QString title READ title NOTIFY titleChanged)
@@ -141,6 +142,8 @@ public:
bool resizing() const;
bool activated() const;
+ QWaylandXdgShell *shell() const;
+
QWaylandSurface *surface() const;
QWaylandXdgSurface *parentSurface() const;
@@ -154,14 +157,17 @@ public:
Q_INVOKABLE uint sendConfigure(const QSize &size, const QVector<State> &states);
Q_INVOKABLE void sendClose();
- Q_INVOKABLE uint requestMaximized(const QSize &size);
- Q_INVOKABLE uint requestUnMaximized(const QSize &size = QSize(0, 0));
- Q_INVOKABLE uint requestFullscreen(const QSize &size);
- Q_INVOKABLE uint requestResizing(const QSize &maxSize);
+ Q_INVOKABLE uint sendMaximized(const QSize &size);
+ Q_INVOKABLE uint sendUnmaximized(const QSize &size = QSize(0, 0));
+ Q_INVOKABLE uint sendFullscreen(const QSize &size);
+ Q_INVOKABLE uint sendResizing(const QSize &maxSize);
+#ifdef QT_WAYLAND_COMPOSITOR_QUICK
QWaylandQuickShellIntegration *createIntegration(QWaylandQuickShellSurfaceItem *item) Q_DECL_OVERRIDE;
+#endif
Q_SIGNALS:
+ void shellChanged();
void surfaceChanged();
void titleChanged();
void windowGeometryChanged();
@@ -174,9 +180,11 @@ Q_SIGNALS:
void resizingChanged();
void activatedChanged();
- void showWindowMenu(QWaylandInputDevice *inputDevice, const QPoint &localSurfacePosition);
- void startMove(QWaylandInputDevice *inputDevice);
- void startResize(QWaylandInputDevice *inputDevice, ResizeEdge edges);
+ void showWindowMenu(QWaylandSeat *seat, const QPoint &localSurfacePosition);
+ void startMove(QWaylandSeat *seat);
+ void startResize(QWaylandSeat *seat, ResizeEdge edges);
+ void setTopLevel();
+ void setTransient();
void setMaximized();
void unsetMaximized();
void setFullscreen(QWaylandOutput *output);
@@ -190,24 +198,33 @@ private:
private Q_SLOTS:
void handleSurfaceSizeChanged();
+ void handleBufferScaleChanged();
};
-class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandXdgPopup : public QWaylandCompositorExtensionTemplate<QWaylandXdgPopup>
+class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandXdgPopup : public QWaylandShellSurfaceTemplate<QWaylandXdgPopup>
{
Q_OBJECT
Q_DECLARE_PRIVATE(QWaylandXdgPopup)
+ Q_PROPERTY(QWaylandXdgShell *shell READ shell NOTIFY shellChanged)
Q_PROPERTY(QWaylandSurface *surface READ surface NOTIFY surfaceChanged)
Q_PROPERTY(QWaylandSurface *parentSurface READ parentSurface NOTIFY parentSurfaceChanged)
+ Q_PROPERTY(QPoint position READ position)
public:
QWaylandXdgPopup();
- QWaylandXdgPopup(QWaylandXdgShell *xdgShell, QWaylandSurface *surface, QWaylandSurface *parentSurface, const QWaylandResource &resource);
+ QWaylandXdgPopup(QWaylandXdgShell *xdgShell, QWaylandSurface *surface, QWaylandSurface *parentSurface,
+ const QPoint &position, const QWaylandResource &resource);
+
+ Qt::WindowType windowType() const override { return Qt::WindowType::Popup; }
Q_INVOKABLE void initialize(QWaylandXdgShell *shell, QWaylandSurface *surface,
- QWaylandSurface *parentSurface, const QWaylandResource &resource);
+ QWaylandSurface *parentSurface, const QPoint &position, const QWaylandResource &resource);
+
+ QWaylandXdgShell *shell() const;
QWaylandSurface *surface() const;
QWaylandSurface *parentSurface() const;
+ QPoint position() const;
static const struct wl_interface *interface();
static QByteArray interfaceName();
@@ -216,7 +233,12 @@ public:
Q_INVOKABLE void sendPopupDone();
+#ifdef QT_WAYLAND_COMPOSITOR_QUICK
+ QWaylandQuickShellIntegration *createIntegration(QWaylandQuickShellSurfaceItem *item) Q_DECL_OVERRIDE;
+#endif
+
Q_SIGNALS:
+ void shellChanged();
void surfaceChanged();
void parentSurfaceChanged();