http://bugs.winehq.org/show_bug.cgi?id=13393
--- Comment #4 from Vincent Povirk madewokherd@gmail.com 2008-11-03 11:31:35 --- So right now what happens is this: * Virtual desktop gets an SC_CLOSE message. * Explorer calls ExitWindows() to clear out any windows in the virtual desktop. * ExitWindows() calls wineboot --end-session. * Wineboot notifies all windows in the current desktop that the session is ending (this is wrong but not the cause of the problem; it should notify all windows). * Wineboot kills any processes that are left, on any desktop.
As far as I can tell, Windows doesn't have any API for "cleanly shut down this desktop". The solution is probably to add some sort of --close-desktop switch to wineboot.