summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorNick Ratelle <nratelle@qnx.com>2012-02-07 18:18:23 (GMT)
committerQt by Nokia <qt-info@nokia.com>2012-03-12 07:00:02 (GMT)
commitbb2f051d7443a462bec8c47225aeb62bc0f76bf8 (patch)
treea5bf9a6c5d03d2f5708b6fcaabe124f58a28e9b9 /src/gui/kernel
parent25c4ce6deef20c69d00fe1197a60e8b7587c81cb (diff)
downloadQt-bb2f051d7443a462bec8c47225aeb62bc0f76bf8.zip
Qt-bb2f051d7443a462bec8c47225aeb62bc0f76bf8.tar.gz
Qt-bb2f051d7443a462bec8c47225aeb62bc0f76bf8.tar.bz2
Hang on to the correct screen index in QWidget
Hang onto the screen index that this widget should be placed on in case the platform cannot move the window onto the screen yet, when window is not yet created and the plugin cannot access the topData to update the screenIndex. When this variable is later referenced after the window is created, it defaults to screenIndex 0, so the window is never moved correctly. Change-Id: Ica78fd90aa3dacc29f81b2f6bd6c8b45d2fb2961 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qwidget.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index 557329e..eea7b7c 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -1313,6 +1313,7 @@ void QWidgetPrivate::init(QWidget *parentWidget, Qt::WindowFlags f)
#elif defined(Q_WS_QPA)
if (desktopWidget) {
int screen = desktopWidget->d_func()->topData()->screenIndex;
+ topData()->screenIndex = screen;
QPlatformIntegration *platform = QApplicationPrivate::platformIntegration();
platform->moveToScreen(q, screen);
}