Developers,
You are good。
unplug the USB type mouse or keyboard, insert the USB mouse or keyboard again, windows will first load the USBDK mapping
driver locally, spice-gtk does not filter out the mouse or keyboard does not allow loading USBDK Driver, resulting in the mouse
or keyboard can not be used, must restart the local windows system.
The attachment is patch
diff -uNr a/usb-device-manager.c b/usb-device-manager.c
--- a/usb-device-manager.c 2018-08-29 12:00:42.525130625 +0800
+++ b/usb-device-manager.c 2018-08-29 16:54:48.730963431 +0800
@@ -935,6 +935,7 @@
SpiceUsbDeviceManagerPrivate *priv = self->priv;
struct libusb_device_descriptor desc;
SpiceUsbDevice *device;
+ gchar *descusb=NULL;
if (!spice_usb_device_manager_get_device_descriptor(libdev, &desc))
return;
@@ -946,6 +947,16 @@
device = (SpiceUsbDevice*)spice_usb_device_new(libdev);
if (!device)
return;
+
+#ifndef G_OS_WIN32
+ descusb = spice_usb_device_get_description(device, NULL);
+ if(g_strrstr(descusb, "Mouse") || g_strrstr(descusb, "Keyboard")){
+ g_free(descusb);
+ return;
+ }
+ if(descusb!=NULL)
+ g_free(descusb);
+#endif
g_ptr_array_add(priv->devices, device);
--- a/usb-device-manager.c 2018-08-29 12:00:42.525130625 +0800
+++ b/usb-device-manager.c 2018-08-29 16:54:48.730963431 +0800
@@ -935,6 +935,7 @@
SpiceUsbDeviceManagerPrivate *priv = self->priv;
struct libusb_device_descriptor desc;
SpiceUsbDevice *device;
+ gchar *descusb=NULL;
if (!spice_usb_device_manager_get_device_descriptor(libdev, &desc))
return;
@@ -946,6 +947,16 @@
device = (SpiceUsbDevice*)spice_usb_device_new(libdev);
if (!device)
return;
+
+#ifndef G_OS_WIN32
+ descusb = spice_usb_device_get_description(device, NULL);
+ if(g_strrstr(descusb, "Mouse") || g_strrstr(descusb, "Keyboard")){
+ g_free(descusb);
+ return;
+ }
+ if(descusb!=NULL)
+ g_free(descusb);
+#endif
g_ptr_array_add(priv->devices, device);
Attachment:
usbmouse.patch
Description: Binary data
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel