Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allows to set screen geometry #14

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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

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.

1 participant