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
b8435343
Commit
b8435343
authored
Oct 31, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Fix get_next/prev_window behavior for unlinked windows.
parent
86c8860d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
window.c
server/window.c
+11
-5
No files found.
server/window.c
View file @
b8435343
...
@@ -77,7 +77,8 @@ struct window
...
@@ -77,7 +77,8 @@ struct window
unsigned
int
ex_style
;
/* window extended style */
unsigned
int
ex_style
;
/* window extended style */
unsigned
int
id
;
/* window id */
unsigned
int
id
;
/* window id */
void
*
instance
;
/* creator instance */
void
*
instance
;
/* creator instance */
int
is_unicode
;
/* ANSI or unicode */
unsigned
int
is_unicode
:
1
;
/* ANSI or unicode */
unsigned
int
is_linked
:
1
;
/* is it linked into the parent z-order list? */
unsigned
long
user_data
;
/* user-specific data */
unsigned
long
user_data
;
/* user-specific data */
WCHAR
*
text
;
/* window caption text */
WCHAR
*
text
;
/* window caption text */
unsigned
int
paint_flags
;
/* various painting flags */
unsigned
int
paint_flags
;
/* various painting flags */
...
@@ -142,6 +143,7 @@ static int set_parent_window( struct window *win, struct window *parent )
...
@@ -142,6 +143,7 @@ static int set_parent_window( struct window *win, struct window *parent )
{
{
win
->
parent
=
parent
;
win
->
parent
=
parent
;
list_add_head
(
&
parent
->
children
,
&
win
->
entry
);
list_add_head
(
&
parent
->
children
,
&
win
->
entry
);
win
->
is_linked
=
1
;
/* if parent belongs to a different thread and the window isn't */
/* if parent belongs to a different thread and the window isn't */
/* top-level, attach the two threads */
/* top-level, attach the two threads */
...
@@ -151,6 +153,7 @@ static int set_parent_window( struct window *win, struct window *parent )
...
@@ -151,6 +153,7 @@ static int set_parent_window( struct window *win, struct window *parent )
else
/* move it to parent unlinked list */
else
/* move it to parent unlinked list */
{
{
list_add_head
(
&
win
->
parent
->
unlinked
,
&
win
->
entry
);
list_add_head
(
&
win
->
parent
->
unlinked
,
&
win
->
entry
);
win
->
is_linked
=
0
;
}
}
return
1
;
return
1
;
}
}
...
@@ -159,7 +162,6 @@ static int set_parent_window( struct window *win, struct window *parent )
...
@@ -159,7 +162,6 @@ static int set_parent_window( struct window *win, struct window *parent )
static
inline
struct
window
*
get_next_window
(
struct
window
*
win
)
static
inline
struct
window
*
get_next_window
(
struct
window
*
win
)
{
{
struct
list
*
ptr
=
list_next
(
&
win
->
parent
->
children
,
&
win
->
entry
);
struct
list
*
ptr
=
list_next
(
&
win
->
parent
->
children
,
&
win
->
entry
);
if
(
ptr
==
&
win
->
parent
->
unlinked
)
ptr
=
NULL
;
return
ptr
?
LIST_ENTRY
(
ptr
,
struct
window
,
entry
)
:
NULL
;
return
ptr
?
LIST_ENTRY
(
ptr
,
struct
window
,
entry
)
:
NULL
;
}
}
...
@@ -167,7 +169,6 @@ static inline struct window *get_next_window( struct window *win )
...
@@ -167,7 +169,6 @@ static inline struct window *get_next_window( struct window *win )
static
inline
struct
window
*
get_prev_window
(
struct
window
*
win
)
static
inline
struct
window
*
get_prev_window
(
struct
window
*
win
)
{
{
struct
list
*
ptr
=
list_prev
(
&
win
->
parent
->
children
,
&
win
->
entry
);
struct
list
*
ptr
=
list_prev
(
&
win
->
parent
->
children
,
&
win
->
entry
);
if
(
ptr
==
&
win
->
parent
->
unlinked
)
ptr
=
NULL
;
return
ptr
?
LIST_ENTRY
(
ptr
,
struct
window
,
entry
)
:
NULL
;
return
ptr
?
LIST_ENTRY
(
ptr
,
struct
window
,
entry
)
:
NULL
;
}
}
...
@@ -402,6 +403,7 @@ static struct window *create_window( struct window *parent, struct window *owner
...
@@ -402,6 +403,7 @@ static struct window *create_window( struct window *parent, struct window *owner
win
->
id
=
0
;
win
->
id
=
0
;
win
->
instance
=
NULL
;
win
->
instance
=
NULL
;
win
->
is_unicode
=
1
;
win
->
is_unicode
=
1
;
win
->
is_linked
=
0
;
win
->
user_data
=
0
;
win
->
user_data
=
0
;
win
->
text
=
NULL
;
win
->
text
=
NULL
;
win
->
paint_flags
=
0
;
win
->
paint_flags
=
0
;
...
@@ -1378,6 +1380,7 @@ static void set_window_pos( struct window *win, struct window *previous,
...
@@ -1378,6 +1380,7 @@ static void set_window_pos( struct window *win, struct window *previous,
list_remove
(
&
win
->
entry
);
/* unlink it from the previous location */
list_remove
(
&
win
->
entry
);
/* unlink it from the previous location */
if
(
previous
)
list_add_after
(
&
previous
->
entry
,
&
win
->
entry
);
if
(
previous
)
list_add_after
(
&
previous
->
entry
,
&
win
->
entry
);
else
list_add_head
(
&
win
->
parent
->
children
,
&
win
->
entry
);
else
list_add_head
(
&
win
->
parent
->
children
,
&
win
->
entry
);
win
->
is_linked
=
1
;
}
}
if
(
swp_flags
&
SWP_SHOWWINDOW
)
win
->
style
|=
WS_VISIBLE
;
if
(
swp_flags
&
SWP_SHOWWINDOW
)
win
->
style
|=
WS_VISIBLE
;
else
if
(
swp_flags
&
SWP_HIDEWINDOW
)
win
->
style
&=
~
WS_VISIBLE
;
else
if
(
swp_flags
&
SWP_HIDEWINDOW
)
win
->
style
&=
~
WS_VISIBLE
;
...
@@ -1765,8 +1768,11 @@ DECL_HANDLER(get_window_tree)
...
@@ -1765,8 +1768,11 @@ DECL_HANDLER(get_window_tree)
struct
window
*
parent
=
win
->
parent
;
struct
window
*
parent
=
win
->
parent
;
reply
->
parent
=
parent
->
handle
;
reply
->
parent
=
parent
->
handle
;
reply
->
owner
=
win
->
owner
;
reply
->
owner
=
win
->
owner
;
if
((
ptr
=
get_next_window
(
win
)))
reply
->
next_sibling
=
ptr
->
handle
;
if
(
win
->
is_linked
)
if
((
ptr
=
get_prev_window
(
win
)))
reply
->
prev_sibling
=
ptr
->
handle
;
{
if
((
ptr
=
get_next_window
(
win
)))
reply
->
next_sibling
=
ptr
->
handle
;
if
((
ptr
=
get_prev_window
(
win
)))
reply
->
prev_sibling
=
ptr
->
handle
;
}
if
((
ptr
=
get_first_child
(
parent
)))
reply
->
first_sibling
=
ptr
->
handle
;
if
((
ptr
=
get_first_child
(
parent
)))
reply
->
first_sibling
=
ptr
->
handle
;
if
((
ptr
=
get_last_child
(
parent
)))
reply
->
last_sibling
=
ptr
->
handle
;
if
((
ptr
=
get_last_child
(
parent
)))
reply
->
last_sibling
=
ptr
->
handle
;
}
}
...
...
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