• Rémi Bernon's avatar
    server: Track desktop users per thread instead of per process. · 769a2616
    Rémi Bernon authored
    As some thread may use a different desktop from their process.
    
    This fixes the user32 win tests, which leaks a desktop that never gets
    closed. The test_shell_window test creates a new desktop, which spawns
    explorer.exe process, incrementing the desktop user count to 1, then
    associates the desktop to a thread, which closes it on exit.
    
    Never the user count is incremented to 2, and closing the thread desktop
    doesn't either check whether the desktop process should be terminated.
    
    Reversely, it is possible to create a desktop, associate it with a
    thread /and/ a process, and this time the desktop process would be
    terminated when the process exits, although the thread may still be
    using it.
    
    Tracking the users per thread is more robust and fixes the problem as
    set_thread_desktop increments the desktop user count, and thread exit
    decrements it.
    Signed-off-by: 's avatarRémi Bernon <rbernon@codeweavers.com>
    Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
    769a2616
Name
Last commit
Last update
..
Makefile.in Loading commit data...
async.c Loading commit data...
atom.c Loading commit data...
change.c Loading commit data...
class.c Loading commit data...
clipboard.c Loading commit data...
completion.c Loading commit data...
console.c Loading commit data...
debugger.c Loading commit data...
device.c Loading commit data...
directory.c Loading commit data...
event.c Loading commit data...
fd.c Loading commit data...
file.c Loading commit data...
file.h Loading commit data...
handle.c Loading commit data...
handle.h Loading commit data...
hook.c Loading commit data...
mach.c Loading commit data...
mailslot.c Loading commit data...
main.c Loading commit data...
mapping.c Loading commit data...
mutex.c Loading commit data...
named_pipe.c Loading commit data...
object.c Loading commit data...
object.h Loading commit data...
process.c Loading commit data...
process.h Loading commit data...
procfs.c Loading commit data...
protocol.def Loading commit data...
ptrace.c Loading commit data...
queue.c Loading commit data...
region.c Loading commit data...
registry.c Loading commit data...
request.c Loading commit data...
request.h Loading commit data...
security.h Loading commit data...
semaphore.c Loading commit data...
serial.c Loading commit data...
signal.c Loading commit data...
sock.c Loading commit data...
symlink.c Loading commit data...
thread.c Loading commit data...
thread.h Loading commit data...
timer.c Loading commit data...
token.c Loading commit data...
trace.c Loading commit data...
unicode.c Loading commit data...
unicode.h Loading commit data...
user.c Loading commit data...
user.h Loading commit data...
window.c Loading commit data...
wineserver.de.UTF-8.man.in Loading commit data...
wineserver.fr.UTF-8.man.in Loading commit data...
wineserver.man.in Loading commit data...
winstation.c Loading commit data...