Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
5d91ab65
Commit
5d91ab65
authored
Mar 21, 2024
by
Rémi Bernon
Committed by
Alexandre Julliard
Mar 21, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Avoid removing thread twice from its desktop thread list.
parent
b13477de
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
winstation.c
server/winstation.c
+11
-7
No files found.
server/winstation.c
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
);
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
);
}
}
/* 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
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment