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
38e74b31
Commit
38e74b31
authored
Jun 07, 2006
by
Robert Shearman
Committed by
Alexandre Julliard
Jun 08, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Don't attach the thread input when changing parents if the new
parent is the desktop (i.e. it is becoming a top-level window).
parent
43890d88
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
window.c
server/window.c
+11
-9
No files found.
server/window.c
View file @
38e74b31
...
...
@@ -114,6 +114,12 @@ inline static struct window *get_window( user_handle_t handle )
return
ret
;
}
/* check if window is the desktop */
static
inline
int
is_desktop_window
(
const
struct
window
*
win
)
{
return
!
win
->
parent
;
/* only desktop windows have no parent */
}
/* change the parent of a window (or unlink the window if the new parent is NULL) */
static
int
set_parent_window
(
struct
window
*
win
,
struct
window
*
parent
)
{
...
...
@@ -136,8 +142,9 @@ static int set_parent_window( struct window *win, struct window *parent )
win
->
parent
=
parent
;
list_add_head
(
&
parent
->
children
,
&
win
->
entry
);
/* if parent belongs to a different thread, attach the two threads */
if
(
parent
->
thread
&&
parent
->
thread
!=
win
->
thread
)
/* if parent belongs to a different thread and the window isn't */
/* top-level, attach the two threads */
if
(
parent
->
thread
&&
parent
->
thread
!=
win
->
thread
&&
!
is_desktop_window
(
parent
))
attach_thread_input
(
win
->
thread
,
parent
->
thread
);
}
else
/* move it to parent unlinked list */
...
...
@@ -177,12 +184,6 @@ static inline struct window *get_last_child( struct window *win )
return
ptr
?
LIST_ENTRY
(
ptr
,
struct
window
,
entry
)
:
NULL
;
}
/* check if window is the desktop */
static
inline
int
is_desktop_window
(
const
struct
window
*
win
)
{
return
!
win
->
parent
;
/* only desktop windows have no parent */
}
/* append a user handle to a handle array */
static
int
add_handle_to_array
(
struct
user_handle_array
*
array
,
user_handle_t
handle
)
{
...
...
@@ -425,7 +426,8 @@ static struct window *create_window( struct window *parent, struct window *owner
goto
failed
;
}
/* if parent belongs to a different thread, attach the two threads */
/* if parent belongs to a different thread and the window isn't */
/* top-level, attach the two threads */
if
(
parent
&&
parent
->
thread
&&
parent
->
thread
!=
current
&&
!
is_desktop_window
(
parent
))
{
if
(
!
attach_thread_input
(
current
,
parent
->
thread
))
goto
failed
;
...
...
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