clutter/evdev: Take over stylus configuration
Stylus configuration (stylus buttons, pressure) was handled at the very high level, doing the button and pressure translations right before sending these to wayland clients. However, it makes more sense to store these settings into the ClutterInputDeviceTool itself, and have clutter apply the config at the lower level so 1) the settings actually apply desktop-wide, not just in clients and 2) X11 and wayland may share similar configuration paths. The settings are now just applied whenever the tool enters proximity, in reaction to ClutterDeviceManager::tool-changed. This commit moves all handling of these two settings to the clutter level, and removes the wayland-specific paths https://bugzilla.gnome.org/show_bug.cgi?id=773779
This commit is contained in:
@@ -59,6 +59,8 @@ struct _ClutterInputDeviceToolEvdev
|
||||
{
|
||||
ClutterInputDeviceTool parent_instance;
|
||||
struct libinput_tablet_tool *tool;
|
||||
GHashTable *button_map;
|
||||
gdouble pressure_curve[4];
|
||||
};
|
||||
|
||||
struct _ClutterInputDeviceToolEvdevClass
|
||||
@@ -72,6 +74,11 @@ ClutterInputDeviceTool * clutter_input_device_tool_evdev_new (struct libinp
|
||||
guint64 serial,
|
||||
ClutterInputDeviceToolType type);
|
||||
|
||||
gdouble clutter_input_device_tool_evdev_translate_pressure (ClutterInputDeviceTool *tool,
|
||||
gdouble pressure);
|
||||
guint clutter_input_device_tool_evdev_get_button_code (ClutterInputDeviceTool *tool,
|
||||
guint button);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __CLUTTER_INPUT_DEVICE_EVDEV_TOOL_H__ */
|
||||
|
Reference in New Issue
Block a user