diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2010-10-07 15:47:08 (GMT) |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2011-01-25 17:51:20 (GMT) |
commit | 4f073a5ae720fc89eda2430f3aaa9e5f4a533af6 (patch) | |
tree | 8470d892f4a1711849384a0a51c1cca95a73342f /src/plugins/platforms/wayland | |
parent | 918baf0ce0132d7751751c3b1a6a5cae3eb566e7 (diff) | |
download | Qt-4f073a5ae720fc89eda2430f3aaa9e5f4a533af6.zip Qt-4f073a5ae720fc89eda2430f3aaa9e5f4a533af6.tar.gz Qt-4f073a5ae720fc89eda2430f3aaa9e5f4a533af6.tar.bz2 |
wayland: Assign a window id to wayland windows
Diffstat (limited to 'src/plugins/platforms/wayland')
-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 |