--- gtk/spicy.c | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/gtk/spicy.c b/gtk/spicy.c index f44642f..4c9708b 100644 --- a/gtk/spicy.c +++ b/gtk/spicy.c @@ -1319,6 +1319,21 @@ static SpiceWindow *create_spice_window(spice_connection *conn, int id, SpiceCha gtk_widget_grab_focus(win->spice); + +#ifdef USE_USBREDIR +#ifdef WIN32 + SpiceUsbDeviceManager *manager = spice_usb_device_manager_get(conn->session, + NULL); + /* widget must be realized for geting its window */ + gtk_widget_realize(win->toplevel); + GdkWindow *w = gtk_widget_get_window(win->toplevel); + /* Set window for receiving Windows device change notifications */ + if (manager && w) { + spice_usb_device_manager_set_window(manager, w); + } +#endif +#endif + return win; } -- 1.7.7.6 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel