diff --git a/clutter/x11/clutter-device-manager-xi2.c b/clutter/x11/clutter-device-manager-xi2.c index f9614f5dd..d508026dd 100644 --- a/clutter/x11/clutter-device-manager-xi2.c +++ b/clutter/x11/clutter-device-manager-xi2.c @@ -401,7 +401,9 @@ translate_hierarchy_event (ClutterBackendX11 *backend_x11, for (i = 0; i < ev->num_info; i++) { - if (ev->info[i].flags & XIDeviceEnabled) + if (ev->info[i].flags & XIDeviceEnabled && + !g_hash_table_lookup (manager_xi2->devices_by_id, + GINT_TO_POINTER (ev->info[i].deviceid))) { XIDeviceInfo *info; int n_devices; @@ -1435,6 +1437,9 @@ clutter_device_manager_xi2_constructed (GObject *gobject) { XIDeviceInfo *xi_device = &info[i]; + if (!xi_device->enabled) + continue; + add_device (manager_xi2, backend_x11, xi_device, TRUE); if (xi_device->use == XIMasterPointer ||