1
0
Fork 0
Commit graph

124 commits

Author SHA1 Message Date
Carlos Garnacho
e2ad8700a9 backends: Export function to query the mapped MetaMonitorInfo of a tablet
Or NULL if the tablet is mapped to the full desktop size.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
323c608b0c backends: Export call to retrieve the base GSettings for a tablet 2016-07-22 13:31:09 +02:00
Carlos Garnacho
0efe076a0a backends: Implement "switch monitor" pad button action
This action remaps the tablet to each of the connected monitors,
or to the span of all monitors.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
56632d2ef7 backends: Add function to retrieve the label for a pad button action
As those are specified by settings.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
8e6244238d backends: Add API to trigger actions related to pad buttons
It does nothing at the moment, but can be hooked into MetaWaylandTabletPad
now. For X11, we need to trigger these for the pad events we receive from
the passive pad button grabs.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
f9552bb9c0 backends: Add function to apply pressure sensitivity to tablet tools
A bezier curve is created out of the 2 control points in settings, so
the pressure is made to follow the stablished curve between 0 and 1.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
fbb4c0b831 backends: Add function to retrieve the action mapped to an stylus button
This function will be useful for the wayland implementation, because buttons
are mapped at the time of sending those through the wire.
As x11/wayland implementations differ here, this function will be useful for
the wayland implementation, as the action is handled lat
2016-07-22 13:31:09 +02:00
Carlos Garnacho
d7faab76e0 backends: Perform libwacom checks before applying settings
Some settings make no sense on external tablets, and others make
no sense in display/system-integrated tablets. Perform those checks
so we don't end up with possibly broken configuration.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
b7892ba1c5 backends: Disable keep-aspect and output mapping on relative devices
Those settings make no sense there, so should be made ineffective.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
77b33a86b8 backends: Fetch libwacom information for tablets in MetaInputSettings
Given that information defines largely how such devices are to be
configured, it makes sense to have that information at hand. A getter
has been also added for the places where it could be useful, although
it will require HAVE_LIBWACOM checks in callers too.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
f6e471fca4 backends: Add function to lookup the mapping for a given tablet
At least for wayland, this needs implementing within mutter. So add
a function to look this setting up.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
1dd121002f backends: Store mappable devices' info in the hashtable
Instead of as closure data. We will need to store (and query) more
per-device info, so access to this struct is necessary.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
526fdca3fb backends: Map tablets/pads, and wire to configuration vfuncs
With this, the left-handed setting works. The other configuration
vfuncs remain empty stubs, but will be correctly applied when those
are handled.
2016-07-22 13:31:09 +02:00
Bastien Nocera
996aeaef41 backends: Fix cut'n'paste error in click method setting
GDesktopTouchpadScrollMethod was used instead of GDesktopTouchpadClickMethod
which became visible now that the former has been removed from
gsettings-desktop-schemas.

https://bugzilla.gnome.org/show_bug.cgi?id=759304
2015-12-15 14:41:51 +01:00
Bastien Nocera
a27b2597b9 backends: Force 2-finger scroll by default if available
When the touchpad is two-finger scrolling capable, always enable it.

When the touchpad only supports edge scrolling (usually older devices, and
usually smaller devices), allow disabling the edge scrolling.

This requires a newer gsettings-desktop-schemas as the scroll-method key
was removed, and the edge-scroll-enabled key added.

https://bugzilla.gnome.org/show_bug.cgi?id=759304
2015-12-15 14:38:23 +01:00
Florian Müllner
bc00f118f3 Avoid shadowing existing variables 2015-09-24 03:08:22 +02:00
Carlos Garnacho
8dfb88b669 backend: Apply the right settings to the right input devices
Since 8769b3d55, the checks performed on which update_* function was
called for each device got quite more lax, leading to failed asserts
on code that assumed the previous behavior.

Change update_[mouse|touchpad|trackball]_* to bail out early if the
device received has not the right type, and remove the asserts.

https://bugzilla.gnome.org/show_bug.cgi?id=747886
2015-04-15 13:33:12 +02:00
Rui Matos
cfb7297cf1 input-settings: Silence a glib critical
The scroll-wheel-emulation-button key is 'i' in the schema but it also
specifies a minimum range of 0 so using get_int() and casting is safe.
2015-04-14 18:27:52 +02:00
Rui Matos
8769b3d554 input-settings: Ensure that we always apply the same set of settings
This makes the hotplug and coldplug paths the same so that we don't
miss out on any setting.

https://bugzilla.gnome.org/show_bug.cgi?id=747434
2015-04-14 16:20:15 +02:00
Carlos Garnacho
9b50119d31 backend: Add set_click_method MetaInputSettings vfunc
This will configure the libinput_config_click_method for touchpads.

https://bugzilla.gnome.org/show_bug.cgi?id=746290
2015-03-16 18:05:51 +01:00
Carlos Garnacho
1dea1813b1 input-settings: Handle device-to-output mapping
For each device that can be mapped (touchscreens, tablets), the output
will be fetched from settings and matched with the currently connected
ones. If a match is found, the device matrix will be found out from the
output configuration and set on the device.

This is also updated both individually for newly connected devices, and
collectively on output configuration changes.

https://bugzilla.gnome.org/show_bug.cgi?id=739397
2015-01-18 13:32:28 -08:00
Carlos Garnacho
2d878d3f55 backends/native: Add libinput-based MetaInputSettings implementation
The libinput_device is fetched from the ClutterInputDevice, and configured
through the libinput_device_*config* API.

https://bugzilla.gnome.org/show_bug.cgi?id=739397
2015-01-18 13:32:28 -08:00
Carlos Garnacho
3c06f2dc90 backends/x11: Implement X11-specific MetaInputSettings
This goes through modifying XI2 device properties, either common ones (eg.
set on every device) or those specific to the libinput X11 driver. Keyboard
repeat/rate are set through core and XKB APIs.

https://bugzilla.gnome.org/show_bug.cgi?id=739397
2015-01-18 13:32:28 -08:00
Carlos Garnacho
460e1fd7ca backends: Add MetaInputSettings
This object internally keeps track of the relevant input configuration,
and goes through its vmethods in order to apply the configuration on the
backend-specific devices.

So far, only mouse/touchpad settings are actually attached to GSettings
changes. ::set_matrix(), meant for tablets/touchscreens, is not hooked
yet.

One caveat is that meta_input_settings_create() may return NULL if the
backend does not own the windowing system (wayland nested on X11 being
the one case), and thus device settings can't be changed freely.

https://bugzilla.gnome.org/show_bug.cgi?id=739397
2015-01-18 13:32:28 -08:00