diff options
author | Jørgen Lind <jorgen.lind@nokia.com> | 2010-04-08 07:58:08 (GMT) |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2010-04-08 07:58:08 (GMT) |
commit | d6cf18d036df1ecead4c8471944880c7f9a414f6 (patch) | |
tree | 62bfa1bd88a5ad164abd611404c1e75aae1e2752 /src/gui/kernel/qwidget_lite.cpp | |
parent | c13076a30e5ae3d0f6795261ad00ca1eb73ad0b9 (diff) | |
download | Qt-d6cf18d036df1ecead4c8471944880c7f9a414f6.zip Qt-d6cf18d036df1ecead4c8471944880c7f9a414f6.tar.gz Qt-d6cf18d036df1ecead4c8471944880c7f9a414f6.tar.bz2 |
QPlatformWindow refactoring
and ported the directfb plugin to use QPlatformWindow
Diffstat (limited to 'src/gui/kernel/qwidget_lite.cpp')
-rw-r--r-- | src/gui/kernel/qwidget_lite.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/gui/kernel/qwidget_lite.cpp b/src/gui/kernel/qwidget_lite.cpp index 7915d7f..cf93c5e 100644 --- a/src/gui/kernel/qwidget_lite.cpp +++ b/src/gui/kernel/qwidget_lite.cpp @@ -71,8 +71,13 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO QWindowSurface *surface = q->windowSurface(); QPlatformWindow *platformWindow = q->platformWindow(); + if (!platformWindow) { + platformWindow = QApplicationPrivate::platformIntegration()->createPlatformWindow(q); + } + Q_ASSERT(platformWindow); + if (!surface) { - QApplicationPrivate::platformIntegration()->createWindowAndSurface(&platformWindow,&surface,q); + surface = QApplicationPrivate::platformIntegration()->createWindowSurfaceForWindow(q,platformWindow->winId()); } Q_ASSERT(surface); @@ -102,8 +107,7 @@ void QWidgetPrivate::setParent_sys(QWidget *newparent, Qt::WindowFlags f) { Q_Q(QWidget); - - QWidget *oldParent = q->parentWidget(); +// QWidget *oldParent = q->parentWidget(); Qt::WindowFlags oldFlags = data.window_flags; if (parent != newparent) { QObjectPrivate::setParent_helper(newparent); //### why does this have to be done in the _sys function??? @@ -643,8 +647,8 @@ void QWidgetPrivate::updateFrameStrut() void QWidgetPrivate::setWindowOpacity_sys(qreal level) { - Q_UNUSED(level); - // XXX + Q_Q(QWidget); + q->platformWindow()->setOpacity(level); } void QWidgetPrivate::setWSGeometry(bool dontShow, const QRect &oldRect) @@ -663,6 +667,7 @@ QPaintEngine *QWidget::paintEngine() const QWindowSurface *QWidgetPrivate::createDefaultWindowSurface_sys() { qFatal("CreateDefaultWindowSurface_sys should not be used on lighthouse"); + return 0; } void QWidgetPrivate::setModal_sys() |