PATCH - implement LockWorkStation using xdg-screensaver

Stefan Dösinger stefandoesinger at
Sat May 12 07:15:50 CDT 2007

Am Samstag 12 Mai 2007 12:13 schrieb Steven Edwards:
> Hi,
> This patch was an attempt to implemented LockWorkStation using
> xdg-screensaver. It works for my simple test app that calls the
> function but my real world application Process Explorer ends up
> hanging now rather than crashing and still does not properly lock the
> workstation. I am not quite sure why. Perhaps someone else is
> interested in this to help improve wine usability. Also I guess I
> should use HeapAlloc rather than malloc.
Yeah, you should use HeapAlloc, and perhaps remove the xmalloc() wrapper :-) . 
If you test for the existence of xdg-screensaver that way you should close 
the opened file afterwards. If I remember correctly execvp would check $PATH 
for the file, so you don't have to hardcode /usr/bin/xdg-screensaver, but I 
think some "winescreensaver" program simmilar to winebrowser which is 
configureable via a registry setting would be even better. Also you should 
return TRUE and FALSE instead of 1 and 0.

More information about the wine-patches mailing list