summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowscontext.h
diff options
context:
space:
mode:
authorDaniel Vrátil <dvratil@redhat.com>2015-02-23 20:27:37 +0100
committerShawn Rutledge <shawn.rutledge@digia.com>2015-03-11 07:15:28 +0000
commit3b30a8215e98f6164a1650ce7c7e2a42a3d8746f (patch)
tree9d2795005b22534bca74cd06d294edf474cd1c3b /src/plugins/platforms/windows/qwindowscontext.h
parentd3f6249de30ade8e75fe01bd61f5e7416790c032 (diff)
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>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowscontext.h')
0 files changed, 0 insertions, 0 deletions