This is necessary for redirect-on-connect Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx> --- gtk/usb-device-manager.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/gtk/usb-device-manager.c b/gtk/usb-device-manager.c index 5ed76a1..d0fa8dc 100644 --- a/gtk/usb-device-manager.c +++ b/gtk/usb-device-manager.c @@ -252,17 +252,6 @@ static gboolean spice_usb_device_manager_initable_init(GInitable *initable, return FALSE; } - /* Start listening for usb channels connect/disconnect */ - g_signal_connect(priv->session, "channel-new", - G_CALLBACK(channel_new), self); - g_signal_connect(priv->session, "channel-destroy", - G_CALLBACK(channel_destroy), self); - list = spice_session_get_channels(priv->session); - for (it = g_list_first(list); it != NULL; it = g_list_next(it)) { - channel_new(priv->session, it->data, (gpointer*)self); - } - g_list_free(list); - /* Start listening for usb devices plug / unplug */ priv->udev = g_udev_client_new(subsystems); g_signal_connect(G_OBJECT(priv->udev), "uevent", @@ -279,6 +268,17 @@ static gboolean spice_usb_device_manager_initable_init(GInitable *initable, libusb_free_device_list(priv->coldplug_list, 1); priv->coldplug_list = NULL; + /* Start listening for usb channels connect/disconnect */ + g_signal_connect(priv->session, "channel-new", + G_CALLBACK(channel_new), self); + g_signal_connect(priv->session, "channel-destroy", + G_CALLBACK(channel_destroy), self); + list = spice_session_get_channels(priv->session); + for (it = g_list_first(list); it != NULL; it = g_list_next(it)) { + channel_new(priv->session, it->data, (gpointer*)self); + } + g_list_free(list); + return TRUE; #else g_set_error_literal(err, SPICE_CLIENT_ERROR, SPICE_CLIENT_ERROR_FAILED, -- 1.7.12 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel