Commit a789375f authored by Alexandre Julliard's avatar Alexandre Julliard

server: Don't touch the users count when a system process switches desktops.

parent 6b007698
......@@ -309,17 +309,18 @@ void set_process_default_desktop( struct process *process, struct desktop *deskt
LIST_FOR_EACH_ENTRY( thread, &process->thread_list, struct thread, proc_entry )
if (!thread->desktop) thread->desktop = handle;
desktop->users++;
if (desktop->close_timeout)
if (!process->is_system)
{
remove_timeout_user( desktop->close_timeout );
desktop->close_timeout = NULL;
}
if (old_desktop)
{
old_desktop->users--;
release_object( old_desktop );
desktop->users++;
if (desktop->close_timeout)
{
remove_timeout_user( desktop->close_timeout );
desktop->close_timeout = NULL;
}
if (old_desktop) old_desktop->users--;
}
if (old_desktop) release_object( old_desktop );
}
/* connect a process to its window station */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment