-
Notifications
You must be signed in to change notification settings - Fork 2
Description
If a user uses xrestrict to confine their tablet to their left screen, and later wants to confine it to their right screen, they cannot do this. This is because interactive selection requires they be able to click on the right screen, but they've already confined themselves to their left screen.
To work around this, a user may unplug and replug their device but that is ugly.
xrestrict could reset all "Coordinate Transformation Matrix"s to identity prior to grabbing pointers, but that potentially munges state the user may wish to keep. In practice I believe this to be acceptable though, as tablets seem to be the most common type of device with absolute X and Y axes, and it seems unlikely a user would have two connected at once. Therefore the following procedure ought to be good enough:
- Find all devices with absolute X and Y axes with non-identity "Coordinate Transformation Matrix"s.
- Remember these matrices
- Reset all matrices to identity
- Perform grab
- Re-apply all matrices
- Apply xrestrict matrix