server: Don't touch the users count when a system process switches desktops.
This commit is contained in:
parent
6b007698d2
commit
a789375f8b
|
@ -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;
|
||||
|
||||
if (!process->is_system)
|
||||
{
|
||||
desktop->users++;
|
||||
if (desktop->close_timeout)
|
||||
{
|
||||
remove_timeout_user( desktop->close_timeout );
|
||||
desktop->close_timeout = NULL;
|
||||
}
|
||||
if (old_desktop)
|
||||
{
|
||||
old_desktop->users--;
|
||||
release_object( old_desktop );
|
||||
if (old_desktop) old_desktop->users--;
|
||||
}
|
||||
|
||||
if (old_desktop) release_object( old_desktop );
|
||||
}
|
||||
|
||||
/* connect a process to its window station */
|
||||
|
|
Loading…
Reference in New Issue