diff options
-rw-r--r-- | src/plugins/platforms/wayland/qwaylandintegration.cpp | 8 | ||||
-rw-r--r-- | src/plugins/platforms/wayland/qwaylandintegration.h | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/plugins/platforms/wayland/qwaylandintegration.cpp b/src/plugins/platforms/wayland/qwaylandintegration.cpp index 277e965..01affac 100644 --- a/src/plugins/platforms/wayland/qwaylandintegration.cpp +++ b/src/plugins/platforms/wayland/qwaylandintegration.cpp @@ -213,12 +213,20 @@ QWaylandWindow::QWaylandWindow(QWidget *window, QWaylandDisplay *display) , mSurface(0) , mDisplay(display) { + static WId id = 1; + + mWindowId = id++; } QWaylandWindow::~QWaylandWindow() { } +WId QWaylandWindow::winId() const +{ + return mWindowId; +} + void QWaylandWindow::setVisible(bool visible) { QWaylandWindowSurface *wws = diff --git a/src/plugins/platforms/wayland/qwaylandintegration.h b/src/plugins/platforms/wayland/qwaylandintegration.h index 4e50f3c..ed9ca3b 100644 --- a/src/plugins/platforms/wayland/qwaylandintegration.h +++ b/src/plugins/platforms/wayland/qwaylandintegration.h @@ -132,10 +132,12 @@ public: struct wl_surface *surface() { return mSurface; } void setVisible(bool visible); + WId winId() const; private: struct wl_surface *mSurface; QWaylandDisplay *mDisplay; + WId mWindowId; }; class QWaylandIntegration : public QPlatformIntegration |