From c3a171e34e1ec4ec240cf82ce76b4108e7622ba6 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 30 Sep 2013 17:36:11 +0200 Subject: [PATCH] Suppress automatic positioning of popup windows. This seems to cause issues with menus on certain Windows machines. Task-number: QTBUG-33653 Change-Id: I8c31dd3ba5ccc6eb0551048401051d819f49a8c1 Reviewed-by: Shawn Rutledge Reviewed-by: Joerg Bornemann --- src/gui/kernel/qplatformwindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/kernel/qplatformwindow.cpp b/src/gui/kernel/qplatformwindow.cpp index ac82d56241..1f9183db44 100644 --- a/src/gui/kernel/qplatformwindow.cpp +++ b/src/gui/kernel/qplatformwindow.cpp @@ -509,7 +509,8 @@ QRect QPlatformWindow::initialGeometry(const QWindow *w, rect.setHeight(defaultHeight); } } - if (w->isTopLevel() && qt_window_private(const_cast(w))->positionAutomatic) { + if (w->isTopLevel() && qt_window_private(const_cast(w))->positionAutomatic + && w->type() != Qt::Popup) { if (const QPlatformScreen *platformScreen = QPlatformScreen::platformScreenForWindow(w)) { const QRect availableGeometry = platformScreen->availableGeometry(); // Center unless the geometry ( + unknown window frame) is too large for the screen).