Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Davide Beatrici
wine
Commits
5d91ab65
Commit
5d91ab65
authored
1 year ago
by
Rémi Bernon
Committed by
Alexandre Julliard
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
server: Avoid removing thread twice from its desktop thread list.
parent
b13477de
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
server/winstation.c
+15
-11
15 additions, 11 deletions
server/winstation.c
with
15 additions
and
11 deletions
server/winstation.c
+
15
−
11
View file @
5d91ab65
...
...
@@ -403,21 +403,24 @@ static void add_desktop_thread( struct desktop *desktop, struct thread *thread )
}
/* remove a user of the desktop and start the close timeout if necessary */
static
void
remove_desktop_
thread
(
struct
desktop
*
desktop
,
struct
thread
*
thread
)
static
void
remove_desktop_
user
(
struct
desktop
*
desktop
,
struct
thread
*
thread
)
{
struct
process
*
process
;
list_remove
(
&
thread
->
desktop_entry
);
assert
(
desktop
->
users
>
0
);
desktop
->
users
--
;
if
(
!
thread
->
process
->
is_system
)
{
assert
(
desktop
->
users
>
0
);
desktop
->
users
--
;
/* if we have one remaining user, it has to be the manager of the desktop window */
if
((
process
=
get_top_window_owner
(
desktop
))
&&
desktop
->
users
==
process
->
running_threads
&&
!
desktop
->
close_timeout
)
desktop
->
close_timeout
=
add_timeout_user
(
-
TICKS_PER_SEC
,
close_desktop_timeout
,
desktop
);
}
/* if we have one remaining user, it has to be the manager of the desktop window */
if
((
process
=
get_top_window_owner
(
desktop
))
&&
desktop
->
users
==
process
->
running_threads
&&
!
desktop
->
close_timeout
)
desktop
->
close_timeout
=
add_timeout_user
(
-
TICKS_PER_SEC
,
close_desktop_timeout
,
desktop
);
}
/* remove a thread from the list of threads attached to a desktop */
static
void
remove_desktop_thread
(
struct
desktop
*
desktop
,
struct
thread
*
thread
)
{
list_remove
(
&
thread
->
desktop_entry
);
if
(
!
thread
->
process
->
is_system
)
remove_desktop_user
(
desktop
,
thread
);
if
(
desktop
==
desktop
->
winstation
->
input_desktop
)
{
...
...
@@ -546,7 +549,8 @@ void release_thread_desktop( struct thread *thread, int close )
if
(
!
(
desktop
=
get_desktop_obj
(
thread
->
process
,
handle
,
0
)))
clear_error
();
/* ignore errors */
else
{
remove_desktop_thread
(
desktop
,
thread
);
if
(
close
)
remove_desktop_thread
(
desktop
,
thread
);
else
remove_desktop_user
(
desktop
,
thread
);
release_object
(
desktop
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment