From e5e154ac072ce4ee1a03c8e21b1817163336fc73 Mon Sep 17 00:00:00 2001 From: Jesse Barnes Date: Wed, 27 Oct 2010 14:49:16 -0700 Subject: [PATCH] Wayland: set parent window pointer in setParent() We'll need this to handle GL widgets. --- src/plugins/platforms/wayland/qwaylandintegration.cpp | 3 +-- src/plugins/platforms/wayland/qwaylandintegration.h | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/platforms/wayland/qwaylandintegration.cpp b/src/plugins/platforms/wayland/qwaylandintegration.cpp index 866a197..29cd0ee 100644 --- a/src/plugins/platforms/wayland/qwaylandintegration.cpp +++ b/src/plugins/platforms/wayland/qwaylandintegration.cpp @@ -460,8 +460,7 @@ void QWaylandWindow::setParent(const QPlatformWindow *parent) { QWaylandWindow *wParent = (QWaylandWindow *)parent; - mSurface = wParent->surface(); - wParent->attach(mBuffer); + mParentWindow = wParent; } void QWaylandWindow::setVisible(bool visible) diff --git a/src/plugins/platforms/wayland/qwaylandintegration.h b/src/plugins/platforms/wayland/qwaylandintegration.h index e26f9e3..e65c141 100644 --- a/src/plugins/platforms/wayland/qwaylandintegration.h +++ b/src/plugins/platforms/wayland/qwaylandintegration.h @@ -158,6 +158,7 @@ public: QPlatformGLContext *glContext() const; void attach(QWaylandBuffer *buffer); QWaylandBuffer *getBuffer(void) { return mBuffer; } + QWaylandWindow *getParentWindow(void) { return mParentWindow; } private: struct wl_surface *mSurface; @@ -166,6 +167,7 @@ private: WId mWindowId; QWaylandBuffer *mBuffer; + QWaylandWindow *mParentWindow; }; class QWaylandIntegration : public QPlatformIntegration -- 2.7.4