mirror of
https://github.com/brl/mutter.git
synced 2025-02-07 00:54:09 +00:00
core: Query pad devices on MetaPadActionMapper initialization
This object might miss pad devices being made available too early during seat construction at Mutter initialization, and not initialize its own backing data properly for these. Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3143 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3370>
This commit is contained in:
parent
2dec4dd088
commit
91d70ad7a2
@ -157,10 +157,17 @@ device_removed (MetaPadActionMapper *mapper,
|
||||
static void
|
||||
meta_pad_action_mapper_init (MetaPadActionMapper *mapper)
|
||||
{
|
||||
g_autoptr (GList) devices = NULL;
|
||||
GList *l;
|
||||
|
||||
mapper->pads = g_hash_table_new_full (NULL, NULL, NULL,
|
||||
(GDestroyNotify) pad_mapping_info_free);
|
||||
|
||||
mapper->seat = clutter_backend_get_default_seat (clutter_get_default_backend ());
|
||||
devices = clutter_seat_list_devices (mapper->seat);
|
||||
|
||||
for (l = devices; l; l = l->next)
|
||||
device_added (mapper, l->data);
|
||||
}
|
||||
|
||||
MetaPadActionMapper *
|
||||
|
Loading…
x
Reference in New Issue
Block a user