Skip to content

Perform absolute devices' (tablets/touchscreens) mapping to outputs within mutter

Carlos Garnacho requested to merge wip/carlosg/abs-input-mapper into master

It's been a while now that mutter applies the mapping settings so absolute axis devices have the right matrix given the arrangement of outputs. But g-s-d still did take care of the policy, figuring out which display-mappable input device belongs to which display.

This series of commits move this role within mutter as well, making it possible to drop a good chunk of code in g-s-d.

A slight concern I have here is the usage of the /org/gnome/desktop/peripherals/kind/id/display settings. It used to be "the word" for mutter, always set to something by g-s-d unless the device had to be mapped to the full span of monitors. Now it should just be set when you want to force things. This has 2 small issues:

  • The key being empty would now mean "apply your own heuristics" instead of "use identity matrix". This is a slight change in semantics, but not a big concern as the heuristics only apply to devices that supposedly have a fixed mapping (i.e. because they are physically layered on top of a monitor), except
  • This key will definitely be set, because g-s-d used to set this. Users that update would find their devices being stuck to the last display g-s-d deemed proper, and heuristics never kicking in.

We can trust g-s-d got it right, or that any issue could be fixed by unplugging/plugging monitors, however this is another possible source for "my device isn't mapped right" besides heuristics getting it wrong.

Merge request reports