From e917c1d5aa66f9ab1f85d820365d421adf15df78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Wed, 1 Jun 2011 14:28:49 +0200 Subject: [PATCH 1/2] Make tst_QWidget::ensureCreated() pass with -platform xcb. We need the parent-creation logic to be enabled on QPA as well. --- src/widgets/kernel/qwidget.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 6627fce3e4..83eec1e0b8 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -1446,7 +1446,6 @@ void QWidget::create(WId window, bool initializeWindow, bool destroyOldWindow) flags |= Qt::Window; } -#ifndef Q_WS_QPA if (QWidget *parent = parentWidget()) { if (type & Qt::Window) { if (!parent->testAttribute(Qt::WA_WState_Created)) @@ -1463,7 +1462,6 @@ void QWidget::create(WId window, bool initializeWindow, bool destroyOldWindow) return; } } -#endif //Q_WS_QPA #ifdef QT3_SUPPORT if (flags & Qt::WStaticContents) @@ -2495,7 +2493,6 @@ void QWidgetPrivate::createWinId(WId winid) #endif const bool forceNativeWindow = q->testAttribute(Qt::WA_NativeWindow); if (!q->testAttribute(Qt::WA_WState_Created) || (forceNativeWindow && !q->internalWinId())) { -#ifndef Q_WS_QPA if (!q->isWindow()) { QWidget *parent = q->parentWidget(); QWidgetPrivate *pd = parent->d_func(); @@ -2523,11 +2520,6 @@ void QWidgetPrivate::createWinId(WId winid) } else { q->create(); } -#else - Q_UNUSED(winid); - q->create(); -#endif //Q_WS_QPA - } } From 7c3e1e0ccde93a63e0a0172252c31a4bc445e65d Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Wed, 1 Jun 2011 15:32:58 +0200 Subject: [PATCH 2/2] Have tooltips shown properly with xcb. --- src/plugins/platforms/xcb/qxcbwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp index e4f4fd7c0f..2a45d1e7ca 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.cpp +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp @@ -118,7 +118,7 @@ void QXcbWindow::create() // XCB_CW_BACK_PIXMAP XCB_NONE, // XCB_CW_OVERRIDE_REDIRECT - type == Qt::Popup, + type == Qt::Popup || type == Qt::ToolTip, // XCB_CW_SAVE_UNDER type == Qt::Popup || type == Qt::Tool || type == Qt::SplashScreen || type == Qt::ToolTip || type == Qt::Drawer, // XCB_CW_EVENT_MASK