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 )
|
LIST_FOR_EACH_ENTRY( thread, &process->thread_list, struct thread, proc_entry )
|
||||||
if (!thread->desktop) thread->desktop = handle;
|
if (!thread->desktop) thread->desktop = handle;
|
||||||
|
|
||||||
desktop->users++;
|
if (!process->is_system)
|
||||||
if (desktop->close_timeout)
|
|
||||||
{
|
{
|
||||||
remove_timeout_user( desktop->close_timeout );
|
desktop->users++;
|
||||||
desktop->close_timeout = NULL;
|
if (desktop->close_timeout)
|
||||||
}
|
{
|
||||||
if (old_desktop)
|
remove_timeout_user( desktop->close_timeout );
|
||||||
{
|
desktop->close_timeout = NULL;
|
||||||
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 */
|
/* connect a process to its window station */
|
||||||
|
|
Loading…
Reference in New Issue