[Development] QWindowSystemInterface::handleMouseEvent() relative or absolute?

Laszlo Agocs laszlo.p.agocs at nokia.com
Wed May 16 07:45:50 CEST 2012


Because windowing systems will usually provide absolute coordinates in 
their pointer events, hiding all the cursor management, raw event 
translation, etc. hassle from the clients. Also the Qt events contain 
absolute coordinates and in the end a handleMouseEvent() call is not 
much more then generating a QMouseEvent.

In your case there is no windowing system so it is up to the platform 
and generic plug-ins to implement all the needed logic. Like you 
noticed, if your system becomes complicated, having the loosely coupled 
'platform plug-in plus a bunch of generic plug-ins' combination might 
not be feasible anymore because you are effectively implementing your 
own windowing system and thus need to synchronize and translate the 
incoming raw events in a centralized manner instead of just blindly 
pumping out events (via QWindowSystemInterface calls) independently from 
each generic plug-in.


On 05/16/2012 02:19 AM, ext Johannes Zellner wrote:
> Hi,
> I am currently working on evdevmouse input fixes for the eglfs usecase.
> During the testing I had two mice in parallel .
> I saw that each mouse maintains its own position on the screen, because the
> QWindowSystemInterface::handleMouseEvent() takes only absolute coordinates.
> Wouldn't be relative coordinates better?
> Its hard to fix the issue of multiple mouse input devices, because the
> evdevmouse plugin itself could manage the coordinates and sync between
> multiple devices handled by the same plugin, but if the pointer position is
> manipulated by two different plugins we have a problem.
> This might be already discussed but I could not find an answer, why we choose
> to use absolute coordinates here.
> Thanks,
> Johannes
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development

More information about the Development mailing list