Go to file
Daniel Vrátil 3b30a8215e Improve handling of XRandR events in XCB backend
Querying X server for data can be very expensive, especially when there
are multiple processes querying it at the same time (which is exactly what
happens when screen configuration changes and all Qt applications receive
XRandR change notifications). This patch is aiming to reduce the number of
queries to X server as much as possible by making use of detailed information
available in the RRCrtcChangeNotify and RROutputChangeNotify events.

Firstly, the backend now does not rebuild all QXcbScreens on any change (which
involved the very expensive xcb_randr_get_screen_resources() call), but only
builds the full set of QXcbScreens once in initializeScreens(), and then just
incrementally updates it.

Secondly, it avoids querying X server for all screens geometry as much as
possible, and only does so when CRTC/Output change notification for a particular
screen is delivered.

As a result, handling of all XRandR events on screen change is reduced from tens
of seconds to less then a seconds and applications are better responsive after
that, because we don't block the event loop for long. The X server is also more
responsive after the screen change, since we are not overloading it with requests.

Change-Id: I9b8308341cada71dfc9590030909b1e68a335a1f
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2015-03-11 07:15:28 +00:00
bin Fixed license headers 2015-02-17 18:46:09 +00:00
config.tests eglfs: Pluginize RPi, iMX6 and Mali backends 2015-03-05 09:51:16 +00:00
dist Replace old qt-project.org wiki with wiki.qt.io 2015-02-27 09:27:13 +00:00
doc Merge remote-tracking branch 'origin/5.4' into 5.5 2015-03-04 13:44:29 +01:00
examples Example: Removed the code to handle 'num_entries' info. 2015-03-09 14:21:08 +00:00
lib Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
mkspecs QNX: enable Neon support to be compiled in for QNX 2015-03-09 14:19:24 +00:00
qmake iOS: Use Xcode project to filter out environment variables instead of shell 2015-03-09 13:01:12 +00:00
src Improve handling of XRandR events in XCB backend 2015-03-11 07:15:28 +00:00
tests tst_QDateTime: Mark more Windows incorrect transitions 2015-03-11 07:00:24 +00:00
tools Remove neon command line options from configureapp 2015-03-09 14:19:31 +00:00
util Fixed license headers 2015-02-17 18:46:09 +00:00
.gitattributes Update the git-archive export options 2012-09-07 15:39:31 +02:00
.gitignore Remove qtdemo from gitignore 2014-09-17 12:38:55 +02:00
.qmake.conf Enable -Werror for all of qtbase 2013-09-04 01:50:10 +02:00
.tag Update the git-archive export options 2012-09-07 15:39:31 +02:00
configure eglfs: Pluginize RPi, iMX6 and Mali backends 2015-03-05 09:51:16 +00:00
configure.bat support spaces in build and install dirs 2015-02-17 18:28:00 +00:00
header.BSD Updated BSD licensed file headers 2015-02-15 07:41:17 +00:00
header.FDL Update copyright headers 2015-02-11 06:49:51 +00:00
header.LGPL3 Update copyright headers 2015-02-11 06:49:51 +00:00
header.LGPL3-COMM Update copyright headers 2015-02-11 06:49:51 +00:00
header.LGPL21 Update copyright headers 2015-02-11 06:49:51 +00:00
header.LGPL-ONLY Update copyright headers 2015-02-11 06:49:51 +00:00
INSTALL Doc: Update links in INSTALL file 2015-02-16 09:06:41 +00:00
LGPL_EXCEPTION.txt Update copyright headers 2015-02-11 06:49:51 +00:00
LICENSE.FDL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.LGPLv3 Update copyright headers 2015-02-11 06:49:51 +00:00
LICENSE.LGPLv21 Update copyright headers 2015-02-11 06:49:51 +00:00
LICENSE.PREVIEW.COMMERCIAL Update copyright headers 2015-02-11 06:49:51 +00:00
qtbase.pro remove nonsensical claim about contains() 2014-11-13 14:33:16 +01:00
sync.profile ANGLE: upgrade to 2.1~07d49ef5350a 2014-08-05 16:43:22 +02:00