On 25 Sep 2013, at 11:46 PM, Andrea Franceschini wrote:

> 2013/9/25 Casimiro, Daniel C CIV NUWC NWPT <daniel.casim...@navy.mil>:
> 
>> 1. How to associate the TUIO device with the correct QScreen? (maybe 
>> QScreen::name and the TUIO device name)
>> 2. How is QWindowSystemInterface::handleTouchEvent supposed to handle 
>> multiple screens?
> 
> That's actually the same thing I was wondering. As for 1, I'd say that
> sounds plausible, but is it feasible? As for 2, in my case I don't
> need multiple touch screens, but I suppose that you could somehow
> extend the approach from 1, maybe via on/off-line config?

FWIW XInput permits setting an arbitrary transform to map the touchscreen to 
part of the entire desktop.  It's a bit cumbersome for the most common use case 
but also very flexible.  So I have

/etc/X11/xorg.conf.d/52-acer-touchscreen-options.conf
Section "InputClass"
        # This is for human-readable purposes only.
        Identifier "Acer touchscreen options"
        # Match all devices with either Wacom or Waltop in their product name
        MatchProduct "Advanced Silicon S.A CoolTouch(TM) System"
        # AND match devices with a device path of /dev/input/eventX.
        MatchDevicePath "/dev/input/event*"
        Option "Transformation Matrix" "0.5 0 0.5 0 0.9 0 0 0 1"
EndSection

which goes with my desktop configuration having a 1920x1200 monitor on the left 
and 1920x1080 touchscreen on the right: on the x axis the touchscreen is at 0.5 
and on the y axis the touchscreen is simply shorter than the entire desktop: 
1080/1200 = 0.9.  They could at least have used pixel units instead of 
normalized coordinates, but maybe they were worried about mismatched 
resolutions or something.

Anyway, I think global touch coordinates should be w.r.t. the desktop, not the 
screen.  If you want to simplify and say that tuio only permits mapping the 
touch area to an entire screen, you can still offset the coordinates according 
to the screen's position on the desktop.

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to