Carlos Garnacho
861c4b8535
core: Port to input device capabilities in pad mapper
...
Check for tablets and pad devices using capabilities.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2331 >
2022-03-30 12:06:52 +00:00
Dor Askayo
2a5506170a
core: Initialize g_autofree with NULL
...
This prevents build warnings about use of potentially uninitialized
variables.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2301 >
2022-02-23 20:48:10 +00:00
Carlos Garnacho
1ad98879b7
core: Mark both directions in rings/strips as (un)handled altogether
...
If going on a direction has a keycombo associated and the other does
not, it does not make sense to let the wayland bits handle pad
ring/strip events that only go in one direction.
Ensure that's the case, and also while figuring out the ring/strip
direction based on the initial events.
Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1886
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2001 >
2022-02-14 15:24:27 +00:00
Carlos Garnacho
952caf6b71
core: Refactor strip/ring direction guessing in action handling
...
Make it all happen in meta_pad_action_mapper_handle_action(), since
we'll need better handling here than just "return FALSE".
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2001 >
2022-02-14 15:24:27 +00:00
Carlos Garnacho
101cae03f3
core: Handle mixture of keycombo/no action in pad rings/strips
...
When generating the action label, we expect both directions of these
features to have consistent settings (either both get a keycombo, or
they don't) or these just return NULL altogether.
Since one of the directions has an action associated, this is
misleading, so be more lenient at the time of generating the action
label.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2001 >
2022-02-14 15:24:27 +00:00
Carlos Garnacho
44af2c0d37
core: Be more careful around n_modes signedness
...
This is returned as an integer, which we deal with as an unsigned
integer. Deal with it as an integer all along, and skip safely
negative values.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1920 >
2021-07-07 18:37:54 +02:00
Carlos Garnacho
5f30d1b8ac
backends: Split pad action mapping to a separate object
...
This now lives in the core, and will get updated from events in the
UI thread.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1403 >
2020-11-27 15:14:33 +00:00