Map touch inputs to the single enabled display when the 'last' multi-display mode is in use #388
+47
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm not certain if this is something you will want to merge as-is, but it was a useful patch for us to resolve issues with touch input devices which do not report which display out they map to.
In our situation we run with
-m last
, so there is only ever a single enabled display. This PR detects this situation and automatically maps the touch and pointer inputs to this enabled display.This avoids the need for pre-configuring this using udev rules (I beleive this is considered deprecated anyway?) and allows Cage to automatically work with any touch input device and output display automatically.
I have made sure this works both when the input devices are signalled as added before the outputs and when either the inputs or outputs change.
Related to #243.
Similar in idea to #167 and #193.