Skip to content

Conversation

@amachado-pie
Copy link

@amachado-pie amachado-pie commented Jan 31, 2024

When we have multiple monitors, and only one of them is a touchscreen, we have to be able to define the width, height, xoffset yoffset of the area that will actually be used by the touch screen to create the calibration window.
Example if we have two 800x600 monitors X-Window will be considered as a screen size of width x height: 1600x600, creating a cambas with "1600x600" geometry
However, the touchscreen monitor is X-offset 800, so the correct geometry should be "800x600+800+0"
This PR allows you to override and introduce the detected screen width and height and indicate the XOFF and YOFF offset values that will be used by Canvas for calibration.

Example based on two 800x600 monitors, where the touchsreen is at xoffset 800:

root@ws1t1:~# ./xcalibrate
Pointer devices:
  ID                                Name
   4          Virtual core XTEST pointer
  11      HID 0566:3107 Consumer Control
  13 EloTouchSystems,Inc Elo TouchSystems 2216 AccuTouch® USB Touchmonitor Interface
  15  PixArt Microsoft USB Optical Mouse

Device to calibrate [13]: 

Old calibration:
[[1. 0. 0.]
 [0. 1. 0.]
 [0. 0. 1.]]

Calibrate? [y]: 
Point count (min 3) [4]: 
Disable rotation? [y]: 

Screen width [1600]: 800
Screen height [600]: 
Screen X-offset [0]: 800
Screen Y-offset [0]: 
Geometry: 800x600+800+0

@reinderien
Copy link
Owner

I'm not sure that I understand the use case for this feature. Are you saying that you have a touchscreen surface that does not cover the entire monitor surface, so you need to reduce the calibration area?

@amachado-pie
Copy link
Author

@reinderien You have two monitors in extended mode, which the system treats as one large workspace. Only the second monitor is a touchscreen, so you need to set the X offset where the touchscreen area begins.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants