summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qwidget_qpa.cpp
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-05-16 17:28:56 +0200
committerSamuel Rødal <samuel.rodal@nokia.com>2011-05-16 17:28:56 +0200
commit10a3b10726d2f46b2a284ecb7533bb9226f8c7c8 (patch)
treeee180a5d21a15d0b26b1bb14c10ca1890b675192 /src/widgets/kernel/qwidget_qpa.cpp
parent25f70314e0e2aa5cb913aba108d2e9c16117004a (diff)
Re-implement transient window support in XCB backend.
If a QWindow has a parent but is top-level the corresponding QPlatformWindow should not be re-parented but instead be made transient for the parent window if possible.
Diffstat (limited to 'src/widgets/kernel/qwidget_qpa.cpp')
-rw-r--r--src/widgets/kernel/qwidget_qpa.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/widgets/kernel/qwidget_qpa.cpp b/src/widgets/kernel/qwidget_qpa.cpp
index 533cc0a47c..e6a55968f9 100644
--- a/src/widgets/kernel/qwidget_qpa.cpp
+++ b/src/widgets/kernel/qwidget_qpa.cpp
@@ -93,11 +93,9 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
QWindow *win = topData()->window;
- if (!q->isWindow()) {
- if (QWidget *nativeParent = q->nativeParentWidget()) {
- if (nativeParent->windowHandle())
- win->setParent(nativeParent->windowHandle());
- }
+ if (QWidget *nativeParent = q->nativeParentWidget()) {
+ if (nativeParent->windowHandle())
+ win->setParent(nativeParent->windowHandle());
}
win->setWindowFlags(data.window_flags);