linuxwacom / libwacom

libwacom is a tablet description library
Other
330 stars 166 forks source link

Add support for the dual-tablet on the Lenovo Yoga Book 9i #602

Open whot opened 11 months ago

whot commented 11 months ago

See gnome-control-center#2727, the Lenovo Yoga Book 9i has two built-in identical tablets currently listed as

- name: 'INGENIC Gadget Serial and keyboard Stylus'
  bus: 'usb'
  vid: '0x17ef'
  pid: '0x6161'
  nodes: 
  - /dev/input/event10: 'INGENIC Gadget Serial and keyboard Touchpad'
  - /dev/input/event9: 'INGENIC Gadget Serial and keyboard Stylus'
  - /dev/input/event8: 'INGENIC Gadget Serial and keyboard Stylus'
  - /dev/input/event7: 'INGENIC Gadget Serial and keyboard'

We may need some extra information to tell libwacom consumers that this is a dual-tablet device, though right now I'm not sure how that information would look like or how it'd be used.

whot commented 11 months ago

cc @mistertwo

mistertwo commented 11 months ago

Hey @whot,

Thanks for opening up an issue over here. One place I can see a "unified" enumeration of the screens would be in a drawing/art program so the tools/brush isn't switched between screens (assuming one is drawing across both).

Beyond that, it seems like most things would work with the screens each being addressed as their own entities, as libwacom and GSD are trying to do. Maybe have the screens handle separately for now, then look into the implementation of a DUAL_SCREEN class?

whot commented 11 months ago

fwiw libwacom is just a text-file database with a C library wrapper. It won't control how things work but it could provide a hint like "this is a dual-screen device" which then causes g-c-c or something to search for another device with the same PID and map them accordingly. Or something :)

IOW this issue here is really just about how we can provide that hint, how exactly it'll be used will depend on the caller.