summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget_qpa.cpp
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@nokia.com>2010-09-07 14:33:09 (GMT)
committerJørgen Lind <jorgen.lind@nokia.com>2010-09-07 14:36:11 (GMT)
commit8fbcf5d1a93f50fa59f650468d203115f7a6965b (patch)
tree8ca09f92f659bb36930c5febc3294d06ea48d5be /src/gui/kernel/qwidget_qpa.cpp
parent8a92433b5deb14a27457715241b14764c28ffb39 (diff)
downloadQt-8fbcf5d1a93f50fa59f650468d203115f7a6965b.zip
Qt-8fbcf5d1a93f50fa59f650468d203115f7a6965b.tar.gz
Qt-8fbcf5d1a93f50fa59f650468d203115f7a6965b.tar.bz2
Lighthouse: fix reparenting from topLevel to child widget
also fix Directfb with a hack so that moving windows works
Diffstat (limited to 'src/gui/kernel/qwidget_qpa.cpp')
-rw-r--r--src/gui/kernel/qwidget_qpa.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/gui/kernel/qwidget_qpa.cpp b/src/gui/kernel/qwidget_qpa.cpp
index b3599bd..ac8b37d 100644
--- a/src/gui/kernel/qwidget_qpa.cpp
+++ b/src/gui/kernel/qwidget_qpa.cpp
@@ -145,12 +145,7 @@ void QWidget::destroy(bool destroyWindow, bool destroySubWindows)
}
}
if (destroyWindow) {
- QTLWExtra *topData = d->maybeTopData();
- if (topData) {
- delete topData->platformWindow;
- topData->platformWindow = 0;
- d->data.winid = 0;
- }
+ d->deleteTLSysExtra();
} else {
if (parentWidget() && parentWidget()->testAttribute(Qt::WA_WState_Created)) {
d->hide_sys();
@@ -403,9 +398,10 @@ void QWidgetPrivate::show_sys()
window->setGeometry(geomRect);
}
if (q->isWindow()) {
- if (QWindowSurface *surface = q->windowSurface())
+ if (QWindowSurface *surface = q->windowSurface()) {
if (windowRect.size() != geomRect.size()) {
- surface->resize(geomRect.size());
+ surface->resize(geomRect.size());
+ }
}
if (window)
@@ -781,6 +777,7 @@ void QWidgetPrivate::createSysExtra()
void QWidgetPrivate::deleteSysExtra()
{
+
}
void QWidgetPrivate::createTLSysExtra()
@@ -789,6 +786,11 @@ void QWidgetPrivate::createTLSysExtra()
void QWidgetPrivate::deleteTLSysExtra()
{
+ if (extra && extra->topextra) {
+ delete extra->topextra->platformWindow;
+ extra->topextra->platformWindow = 0;
+ extra->topextra->backingStore.destroy();
+ }
}
void QWidgetPrivate::registerDropSite(bool on)