From 3fdc4ae0ed156851c99dee4b52340cfbc0f9aaf7 Mon Sep 17 00:00:00 2001 From: Alain Boyer Date: Sat, 9 Feb 2013 01:48:44 +0200 Subject: 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 --- src/plugins/platforms/xcb/qxcbconnection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/platforms/xcb/qxcbconnection.cpp') 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 -- cgit v1.2.3