summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qwidget_qpa.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>2011-05-30 14:16:43 +0200
committerLaszlo Agocs <laszlo.p.agocs@nokia.com>2011-05-30 14:41:14 +0200
commite277d144259ce4e440cf789c83ba095b4c4d06a6 (patch)
treec51d4bf7d45f602c108c33eab60daee28fe7477f /src/widgets/kernel/qwidget_qpa.cpp
parentef8e5af1d219dd749ea306230cfd097cc2595cb4 (diff)
Add focus and modal dialog support.
Reviewed-by: Samuel Rødal
Diffstat (limited to 'src/widgets/kernel/qwidget_qpa.cpp')
-rw-r--r--src/widgets/kernel/qwidget_qpa.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/widgets/kernel/qwidget_qpa.cpp b/src/widgets/kernel/qwidget_qpa.cpp
index 2120e40c57..99db2f5295 100644
--- a/src/widgets/kernel/qwidget_qpa.cpp
+++ b/src/widgets/kernel/qwidget_qpa.cpp
@@ -740,8 +740,11 @@ QWindow *QWidget::windowHandle() const
{
Q_D(const QWidget);
QTLWExtra *extra = d->maybeTopData();
- if (extra && extra->window)
+ if (extra) {
+ if (!extra->window)
+ const_cast<QWidgetPrivate *>(d)->createTLSysExtra();
return extra->window;
+ }
return 0;
}