summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@nokia.com>2010-12-14 16:15:44 (GMT)
committerJørgen Lind <jorgen.lind@nokia.com>2011-01-04 14:18:24 (GMT)
commita7fc0e8bad3bd020ece5fa70f0462bcaf59b3d77 (patch)
treeeb49255946f2632e8fe9a96cbbeb3b7cea619be5 /src/plugins/platforms
parente90cb6992e35ed4b9c2aae85edb8d787c24a8a6c (diff)
downloadQt-a7fc0e8bad3bd020ece5fa70f0462bcaf59b3d77.zip
Qt-a7fc0e8bad3bd020ece5fa70f0462bcaf59b3d77.tar.gz
Qt-a7fc0e8bad3bd020ece5fa70f0462bcaf59b3d77.tar.bz2
Fix nativechild widget position in Lighthouse
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r--src/plugins/platforms/testlite/qtestlitewindow.cpp11
-rw-r--r--src/plugins/platforms/testlite/qtestlitewindow.h3
2 files changed, 6 insertions, 8 deletions
diff --git a/src/plugins/platforms/testlite/qtestlitewindow.cpp b/src/plugins/platforms/testlite/qtestlitewindow.cpp
index f8f4a5f..5446615 100644
--- a/src/plugins/platforms/testlite/qtestlitewindow.cpp
+++ b/src/plugins/platforms/testlite/qtestlitewindow.cpp
@@ -71,8 +71,7 @@ QTestLiteWindow::QTestLiteWindow(QWidget *window)
int h = window->height();
if(window->platformWindowFormat().windowApi() == QPlatformWindowFormat::OpenGL
- && QApplicationPrivate
- ::platformIntegration()->hasOpenGL() ) {
+ && QApplicationPrivate::platformIntegration()->hasOpenGL() ) {
#ifndef QT_NO_OPENGL
XVisualInfo *visualInfo = QGLXContext::findVisualInfo(mScreen,window->platformWindowFormat());
Colormap cmap = XCreateColormap(mScreen->display(),mScreen->rootWindow(),visualInfo->visual,AllocNone);
@@ -117,6 +116,7 @@ QTestLiteWindow::QTestLiteWindow(QWidget *window)
}
+
QTestLiteWindow::~QTestLiteWindow()
{
#ifdef MYX11_DEBUG
@@ -557,8 +557,8 @@ WId QTestLiteWindow::winId() const
void QTestLiteWindow::setParent(const QPlatformWindow *window)
{
- QPoint point = widget()->mapTo(widget()->nativeParentWidget(),QPoint());
- XReparentWindow(mScreen->display(),x_window,window->winId(),point.x(),point.y());
+ QPoint topLeft = geometry().topLeft();
+ XReparentWindow(mScreen->display(),x_window,window->winId(),topLeft.x(),topLeft.y());
}
void QTestLiteWindow::raise()
@@ -624,7 +624,8 @@ void QTestLiteWindow::resizeEvent(XConfigureEvent *e)
qDebug() << hex << x_window << dec << "ConfigureNotify" << e->x << e->y << e->width << e->height << "geometry" << xpos << ypos << width << height;
#endif
- QWindowSystemInterface::handleGeometryChange(widget(), QRect(xpos, ypos, e->width, e->height));
+ QRect newRect(xpos, ypos, e->width, e->height);
+ QWindowSystemInterface::handleGeometryChange(widget(), newRect);
}
void QTestLiteWindow::mousePressEvent(XButtonEvent *e)
diff --git a/src/plugins/platforms/testlite/qtestlitewindow.h b/src/plugins/platforms/testlite/qtestlitewindow.h
index 8e9f6fd..7e990ee 100644
--- a/src/plugins/platforms/testlite/qtestlitewindow.h
+++ b/src/plugins/platforms/testlite/qtestlitewindow.h
@@ -136,9 +136,6 @@ private:
QPlatformGLContext *mGLContext;
QTestLiteScreen *mScreen;
Qt::WindowFlags window_flags;
-
- Atom m_mwm_hint_atom;
-
};
#endif