diff options
author | Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com> | 2015-09-10 16:15:35 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2016-10-10 16:06:45 +0000 |
commit | 33d748bb88676b69e596ae77badfeaf5a69a33d1 (patch) | |
tree | ebc1393fe111cfd1bf8b1e84a652756afcbc46c9 /examples/examples.pro | |
parent | 76f53791a198dac7634d4aedb774ed3a86d47c97 (diff) |
Allow granular synchronous and asynchronous delivery of QPA events
The setSynchronousWindowSystemEvents() API of QWindowSystemInterface is
supposed to be set globally by the platform plugin, not switched on and
off to trigger async/sync deliver of events for a specific event.
We introduce processWindowSystemEvent() in QWindowSystemInterfacePrivate
to match postWindowSystemEvent(), where the former is synchronous and
the latter is asynchronous.
This is then coupled with a templated version of handleWindowSystemEvent()
that then calls out to one of the two depending on the specialization
that's used. The default specialization will decide based on the state
set by setSynchronousWindowSystemEvents(), as before.
This allows templated versions of handleMouseEvent, handleKeyEvent, etc
to be added without maintaining two code paths, one for synchronous
and one for asynchronous delivery, which in the end allows us to
get away from using setSynchronousWindowSystemEvents() as a temporary
switch to synchronous mode.
The templates are defined in the QWindowSystemInterface source file,
with explicit instantiations of the three supported modes of delivery,
as having the definition in the header file would both require inlining,
as well as qwindowsysteminterface.h having access to the private parts
of QWindowSystemInterfacePrivate for the template function bodies.
Task-number: QTBUG-56274
Change-Id: I54c34da1ad90ff243f11905529874695f556cfcd
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'examples/examples.pro')
0 files changed, 0 insertions, 0 deletions