summaryrefslogtreecommitdiffstats
path: root/examples/wayland/qwindow-compositor/windowcompositor.h
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@theqtcompany.com>2015-10-06 15:52:22 +0200
committerPaul Olav Tvete <paul.tvete@theqtcompany.com>2015-10-23 13:33:10 +0000
commit36e62983bfe53a6e1f79bf6acaa052bc58a5af63 (patch)
tree734ea930ef035a197b8d8bf792a5fedd04aa9515 /examples/wayland/qwindow-compositor/windowcompositor.h
parent81627842fe961e3b6a3cef29dac9c98c8f2e30c9 (diff)
Add support for popups to example
Change-Id: If2446073b69c91377f399cfd43506e6a211ac209 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Diffstat (limited to 'examples/wayland/qwindow-compositor/windowcompositor.h')
-rw-r--r--examples/wayland/qwindow-compositor/windowcompositor.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/examples/wayland/qwindow-compositor/windowcompositor.h b/examples/wayland/qwindow-compositor/windowcompositor.h
index 1b5329d89..6f878d3a6 100644
--- a/examples/wayland/qwindow-compositor/windowcompositor.h
+++ b/examples/wayland/qwindow-compositor/windowcompositor.h
@@ -87,6 +87,8 @@ public:
void handleResize(WindowCompositorView *target, const QSize &initialSize, const QPoint &delta, int edge);
void handleDrag(WindowCompositorView *target, QMouseEvent *me);
+ bool popupActive() const { return !m_popupViews.isEmpty(); }
+ void closePopups();
protected:
void adjustCursorSurface(QWaylandSurface *surface, int hotspotX, int hotspotY);
@@ -101,6 +103,7 @@ private slots:
void surfaceDestroyed();
void surfaceCommittedSlot();
void viewSurfaceDestroyed();
+ void onStartMove();
void onStartResize(QWaylandInputDevice *inputDevice, QWaylandShellSurface::ResizeEdge edges);
void startDrag();
@@ -109,13 +112,16 @@ private slots:
void onSurfaceCreated(QWaylandSurface *surface);
void onCreateShellSurface(QWaylandSurface *s, QWaylandClient *client, uint id);
+ void onSetTransient(QWaylandSurface *parentSurface, const QPoint &relativeToParent, QWaylandShellSurface::FocusPolicy focusPolicy);
+ void onSetPopup(QWaylandInputDevice *inputDevice, QWaylandSurface *parent, const QPoint &relativeToParent);
+
void updateCursor();
private:
WindowCompositorView *findView(const QWaylandSurface *s) const;
QWindow *m_window;
QList<WindowCompositorView*> m_views;
+ QList<WindowCompositorView*> m_popupViews;
QWaylandShell *m_shell;
-
QWaylandView m_cursorView;
int m_cursorHotspotX;
int m_cursorHotspotY;