mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 00:20:42 -05:00
device/xi2: Blow the cached devices list
Every time we add or remove a device we should clear the cached list that we return in get_devices(), so that it gets repopulated.
This commit is contained in:
parent
de93f721c1
commit
0075c45ca4
@ -272,6 +272,10 @@ add_device (ClutterDeviceManagerXI2 *manager_xi2,
|
||||
_clutter_input_device_add_slave (master, device);
|
||||
}
|
||||
|
||||
/* blow the cache */
|
||||
g_slist_free (manager_xi2->all_devices);
|
||||
manager_xi2->all_devices = NULL;
|
||||
|
||||
g_signal_emit_by_name (manager_xi2, "device-added", device);
|
||||
}
|
||||
|
||||
@ -294,6 +298,10 @@ remove_device (ClutterDeviceManagerXI2 *manager_xi2,
|
||||
manager_xi2->slave_devices =
|
||||
g_list_remove (manager_xi2->slave_devices, device);
|
||||
|
||||
/* blow the cache */
|
||||
g_slist_free (manager_xi2->all_devices);
|
||||
manager_xi2->all_devices = NULL;
|
||||
|
||||
g_signal_emit_by_name (manager_xi2, "device-removed", device);
|
||||
|
||||
g_object_run_dispose (G_OBJECT (device));
|
||||
|
Loading…
Reference in New Issue
Block a user