Hi, On Fri, Aug 12, 2016 at 11:01:36AM -0400, Frediano Ziglio wrote: > Would be something like this (not tested) Yes, it works :) I'll be pushing the previous patch as it still improves the code a bit and resubmit this one (maybe with you as author?) > > So, you think that the fact we have an extra event on VDAgent might be a > > waste thus we can do it in a different part of the code, only once with > > WaitForSingleObject? > > > > It's just another way to pass a flag... if it's set/tested just at startup > there is no reason to put in the main loop. Agreed > > > It is fine by me but I don't see that much of difference to be honest. > > I will try later. > > > > > > > > I don't know if you can use WTSQuerySessionInformation to just > > > retrieve the state (lock/unlock) of the session. > > > > Well, this seems better for a one-time procedure. > > We can use it (WTSINFOEX) and parse the SessionFlags [0]. Windows 7 and > > above which seems okay. > > > > [0] https://msdn.microsoft.com/en-us/library/ee621019(v=vs.85).aspx > > > > I found somebody suggesting the function for earlier versions (like > Windows 2000) but I didn't really find the lock/unlock flag. Oh well, I wrote the code for this but I failed to build it with mingw. We don't really have the WTSINFOEX there [1] (compared with [2]) [1] https://sourceforge.net/p/mingw/mingw-org-wsl/ci/4.0.2/tree/include/wtsapi32.h#l125 [2] https://msdn.microsoft.com/en-us/library/aa383861(v=vs.85).aspx Cheers! toso > > > > > > > Frediano > > > > toso > > > > -- > Frediano > _______________________________________________ > Spice-devel mailing list > Spice-devel@xxxxxxxxxxxxxxxxxxxxx > https://lists.freedesktop.org/mailman/listinfo/spice-devel _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel