diff options
author | Jørgen Lind <jorgen.lind@nokia.com> | 2010-12-08 12:09:36 (GMT) |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2011-01-04 14:18:20 (GMT) |
commit | f6c5b16768d45f196bab0a2766d4be6027991e08 (patch) | |
tree | 610b9b3de9981916b4dc1abef43390caaed1616f /src/gui/kernel/qwidget.cpp | |
parent | 3753b15e88f2c8220b887f27be79491c4135a291 (diff) | |
download | Qt-f6c5b16768d45f196bab0a2766d4be6027991e08.zip Qt-f6c5b16768d45f196bab0a2766d4be6027991e08.tar.gz Qt-f6c5b16768d45f196bab0a2766d4be6027991e08.tar.bz2 |
Add function QPlatformScreen::platformScreenForWidget
This so there is some logical connection between what screen a widget
belongs to
Diffstat (limited to 'src/gui/kernel/qwidget.cpp')
-rw-r--r-- | src/gui/kernel/qwidget.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 16f64ff..6a6a218 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -303,8 +303,6 @@ QWidgetPrivate::QWidgetPrivate(int version) , hasAlienChildren(0) , window_event(0) , qd_hd(0) -#elif defined (Q_WS_QPA) - , screenNumber(0) #endif { if (!qApp) { @@ -1277,7 +1275,7 @@ void QWidgetPrivate::init(QWidget *parentWidget, Qt::WindowFlags f) } #elif defined(Q_WS_QPA) if (desktopWidget) { - int screen = desktopWidget->d_func()->screenNumber; + int screen = desktopWidget->d_func()->topData()->screenIndex; QPlatformIntegration *platform = QApplicationPrivate::platformIntegration(); platform->moveToScreen(q, screen); } @@ -1729,6 +1727,7 @@ void QWidgetPrivate::createTLExtra() #if defined(Q_WS_QPA) x->platformWindow = 0; x->platformWindowFormat = QPlatformWindowFormat::defaultFormat(); + x->screenIndex = 0; #endif } } |