[Spice-devel] windows spice-client-glib hotplug not working
zhou qi
atmgnd at outlook.com
Sat Aug 24 03:05:02 UTC 2019
Sorry about the delay replay(I work on this demo only in spare time), thanks for the advice, I can get usb hotplug working on windows now, the reason is my gui thread and glib thread are two separate threads. After I added Windows Message Loop after spice_session_new call. Now everything is ok.
atmgnd
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
________________________________
发件人: Yuri Benditovich <yuri.benditovich at daynix.com>
发送时间: Thursday, August 22, 2019 4:32:02 PM
收件人: uril at redhat.com <uril at redhat.com>
抄送: zhou qi <atmgnd at outlook.com>; spice-devel at lists.freedesktop.org <spice-devel at lists.freedesktop.org>
主题: Re: [Spice-devel] windows spice-client-glib hotplug not working
On Wed, Aug 21, 2019 at 7:29 PM Uri Lublin <uril at redhat.com> wrote:
>
> On 8/21/19 3:25 AM, zhou qi wrote:
> > Hello, I write a demo under windows unsing *spice-client-glib only*, I> can get usb devices from UsbManager. but hotplug is not working. no> device change event recieved.
>
> Hello,
>
> > I found the function g_udev_client_initable_init in win-usb-dev.c create> a hidden window to monitor WM_DEVICECHANGE message. but I could not> found the corresponding message loop(GetMessage/DispatchMessage...).> Where is the message loop(gtk)? Does it depends on some higher> library(gtk)?How can I get usb hotplug working?
>
> These events are sent to wnd_proc by Windows (the OS).
>
> The hidden window is created, so spice-gtk gets those
> messages from Windows.
>
> Note that this code was moved recently in spice-gtk -- now it's in
> usb-backend.c (that replaces win-usb-dev.c)
>
> Uri
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20190824/c5bc21c5/attachment.html>
More information about the Spice-devel
mailing list