settings: Support mouse and trackball accel profile

Support changing the mouse and trackball acceleration profile. This
makes it possible to for example disable pointer acceleration by
choosing the 'flat' profile.

This adds an optional dependency on gudev. Gudev is used by the X11
backend to detect whether a device is a mouse or not. Without gudev
support, the accel profile settings has have effect for mouse devices.

Trackball still uses the "strstr" approach, since udev doesn't support
tagging devices as trackball devices yet.

https://bugzilla.gnome.org/show_bug.cgi?id=769179
This commit is contained in:
Jonas Ådahl
2016-04-07 15:44:28 +08:00
parent cfe5d7429a
commit 23c4ac6c7f
5 changed files with 375 additions and 5 deletions

View File

@ -100,6 +100,13 @@ struct _MetaInputSettingsClass
gdouble padding_right,
gdouble padding_top,
gdouble padding_bottom);
void (* set_mouse_accel_profile) (MetaInputSettings *settings,
ClutterInputDevice *device,
GDesktopPointerAccelProfile profile);
void (* set_trackball_accel_profile) (MetaInputSettings *settings,
ClutterInputDevice *device,
GDesktopPointerAccelProfile profile);
};
GType meta_input_settings_get_type (void) G_GNUC_CONST;
@ -140,4 +147,6 @@ WacomDevice * meta_input_settings_get_tablet_wacom_device (MetaInputSettings *se
ClutterInputDevice *device);
#endif
gboolean meta_input_device_is_trackball (ClutterInputDevice *device);
#endif /* META_INPUT_SETTINGS_PRIVATE_H */