common: Add GsdDeviceMapper
This is an object attached to the default screen, meant to be used across several g-s-d plugins. On one hand, it keeps track of monitors and their layout/rotation/mode. On the other hand, g-s-d plugins tell GsdDeviceMapper which GdkDevices will be handled by this object, so a monitor is chosen to map the GdkDevice to, applying what we know about the input device. The primary source to know the corresponding monitor is the configuration, if an input device has a configured display in GSettings, and the monitor is currently present, that will be the one the input device will map to. When an input device has no settings, or an unconfigured monitor, multiple things are checked in order to find out a good guess for the GdkDevice. - System-integrated input devices go to the built-in output - Several EDID checks are done for Wacom devices with a built-in screen - Sanity checks are done on outputs with screen-integrated input devices, if a monitor already has a GdkDevice with similar capabilities (eg. a system-integrated pen), this output will be punted, so there is no accumulation of input devices. If an output is found on some or other way, the GdkDevice will be mapped to that output, and follow it if the display configuration changes, or device left/right handedness changes. https://bugzilla.gnome.org/show_bug.cgi?id=709600
parent
b462e656
Please register or sign in to comment