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 <shawn.rutledge@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
bb10
Friedemann Kleint 2013-09-30 17:36:11 +02:00 committed by The Qt Project
parent 89f9bc9c5f
commit c3a171e34e
1 changed files with 2 additions and 1 deletions

View File

@ -509,7 +509,8 @@ QRect QPlatformWindow::initialGeometry(const QWindow *w,
rect.setHeight(defaultHeight);
}
}
if (w->isTopLevel() && qt_window_private(const_cast<QWindow*>(w))->positionAutomatic) {
if (w->isTopLevel() && qt_window_private(const_cast<QWindow*>(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).