Wayland: set parent window pointer in setParent()
authorJesse Barnes <jbarnes@virtuousgeek.org>
Wed, 27 Oct 2010 21:49:16 +0000 (14:49 -0700)
committerJørgen Lind <jorgen.lind@nokia.com>
Tue, 25 Jan 2011 18:00:30 +0000 (19:00 +0100)
We'll need this to handle GL widgets.

src/plugins/platforms/wayland/qwaylandintegration.cpp
src/plugins/platforms/wayland/qwaylandintegration.h

index 866a197..29cd0ee 100644 (file)
@@ -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)
index e26f9e3..e65c141 100644 (file)
@@ -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