diff options
author | Alain Boyer <alainboyer@gmail.com> | 2013-02-09 01:48:44 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-02-25 14:59:35 +0100 |
commit | 3fdc4ae0ed156851c99dee4b52340cfbc0f9aaf7 (patch) | |
tree | b4c9d1ad09ecf7804b6c5041a7816aa6616d1680 /src/plugins/platforms/xcb/qxcbconnection.cpp | |
parent | 7df995a9bd3e989b4136f98424490604eb5178aa (diff) |
Fix primary screen selection.
When selecting the primary screen, the m_primaryScreen value obtained
from the xcb_connect() call should be respected. This ensures that the
proper primary screen is selected when specifying the DISPLAY
environment variable.
Task-number: QTBUG-27220
Change-Id: I60aa207f13d919087d4d2913141c804928684731
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbconnection.cpp')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbconnection.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp index 32de54562a..a36f823b7c 100644 --- a/src/plugins/platforms/xcb/qxcbconnection.cpp +++ b/src/plugins/platforms/xcb/qxcbconnection.cpp @@ -184,7 +184,7 @@ void QXcbConnection::updateScreens() activeScreens << screen; ++screenNumber; if (!primaryScreen && primary) { - if (primary->output == XCB_NONE || outputs[i] == primary->output) { + if (m_primaryScreen == xcbScreenNumber && (primary->output == XCB_NONE || outputs[i] == primary->output)) { primaryScreen = screen; siblings.prepend(siblings.takeLast()); #ifdef Q_XCB_DEBUG |