Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
6b36e213
Commit
6b36e213
authored
Jun 25, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Also return the top-level message window in the get_desktop_window request.
parent
d71303e9
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
19 deletions
+47
-19
win.c
dlls/user32/win.c
+10
-2
server_protocol.h
include/wine/server_protocol.h
+3
-2
protocol.def
server/protocol.def
+2
-1
trace.c
server/trace.c
+2
-1
window.c
server/window.c
+30
-13
No files found.
dlls/user32/win.c
View file @
6b36e213
...
...
@@ -1636,7 +1636,11 @@ HWND WINAPI GetDesktopWindow(void)
SERVER_START_REQ
(
get_desktop_window
)
{
req
->
force
=
0
;
if
(
!
wine_server_call
(
req
))
thread_info
->
top_window
=
reply
->
handle
;
if
(
!
wine_server_call
(
req
))
{
thread_info
->
top_window
=
reply
->
top_window
;
thread_info
->
msg_window
=
reply
->
msg_window
;
}
}
SERVER_END_REQ
;
...
...
@@ -1675,7 +1679,11 @@ HWND WINAPI GetDesktopWindow(void)
SERVER_START_REQ
(
get_desktop_window
)
{
req
->
force
=
1
;
if
(
!
wine_server_call
(
req
))
thread_info
->
top_window
=
reply
->
handle
;
if
(
!
wine_server_call
(
req
))
{
thread_info
->
top_window
=
reply
->
top_window
;
thread_info
->
msg_window
=
reply
->
msg_window
;
}
}
SERVER_END_REQ
;
}
...
...
include/wine/server_protocol.h
View file @
6b36e213
...
...
@@ -2796,7 +2796,8 @@ struct get_desktop_window_request
struct
get_desktop_window_reply
{
struct
reply_header
__header
;
user_handle_t
handle
;
user_handle_t
top_window
;
user_handle_t
msg_window
;
};
...
...
@@ -4996,6 +4997,6 @@ union generic_reply
struct
add_fd_completion_reply
add_fd_completion_reply
;
};
#define SERVER_PROTOCOL_VERSION 3
39
#define SERVER_PROTOCOL_VERSION 3
40
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/protocol.def
View file @
6b36e213
...
...
@@ -2061,7 +2061,8 @@ enum message_type
@REQ(get_desktop_window)
int force; /* force creation if it doesn't exist */
@REPLY
user_handle_t handle; /* handle to the desktop window */
user_handle_t top_window; /* handle to the desktop window */
user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
@END
...
...
server/trace.c
View file @
6b36e213
...
...
@@ -2575,7 +2575,8 @@ static void dump_get_desktop_window_request( const struct get_desktop_window_req
static
void
dump_get_desktop_window_reply
(
const
struct
get_desktop_window_reply
*
req
)
{
fprintf
(
stderr
,
" handle=%p"
,
req
->
handle
);
fprintf
(
stderr
,
" top_window=%p,"
,
req
->
top_window
);
fprintf
(
stderr
,
" msg_window=%p"
,
req
->
msg_window
);
}
static
void
dump_set_window_owner_request
(
const
struct
set_window_owner_request
*
req
)
...
...
server/window.c
View file @
6b36e213
...
...
@@ -549,21 +549,13 @@ void destroy_thread_windows( struct thread *thread )
}
/* get the desktop window */
static
struct
window
*
get_desktop_window
(
struct
thread
*
thread
,
int
create
)
static
struct
window
*
get_desktop_window
(
struct
thread
*
thread
)
{
struct
window
*
top_window
;
struct
desktop
*
desktop
=
get_thread_desktop
(
thread
,
0
);
if
(
!
desktop
)
return
NULL
;
if
(
!
(
top_window
=
desktop
->
top_window
)
&&
create
)
{
if
((
top_window
=
create_window
(
NULL
,
NULL
,
DESKTOP_ATOM
,
0
)))
{
detach_window_thread
(
top_window
);
top_window
->
style
=
WS_POPUP
|
WS_VISIBLE
|
WS_CLIPSIBLINGS
|
WS_CLIPCHILDREN
;
}
}
top_window
=
desktop
->
top_window
;
release_object
(
desktop
);
return
top_window
;
}
...
...
@@ -786,7 +778,7 @@ static struct window *find_child_to_repaint( struct window *parent, struct threa
/* find a window that needs to receive a WM_PAINT; also clear its internal paint flag */
user_handle_t
find_window_to_repaint
(
user_handle_t
parent
,
struct
thread
*
thread
)
{
struct
window
*
ptr
,
*
win
,
*
top_window
=
get_desktop_window
(
thread
,
0
);
struct
window
*
ptr
,
*
win
,
*
top_window
=
get_desktop_window
(
thread
);
if
(
!
top_window
)
return
0
;
...
...
@@ -1794,9 +1786,34 @@ DECL_HANDLER(destroy_window)
/* retrieve the desktop window for the current thread */
DECL_HANDLER
(
get_desktop_window
)
{
struct
window
*
win
=
get_desktop_window
(
current
,
req
->
force
);
struct
desktop
*
desktop
=
get_thread_desktop
(
current
,
0
);
if
(
!
desktop
)
return
;
if
(
!
desktop
->
top_window
&&
req
->
force
)
/* create it */
{
if
((
desktop
->
top_window
=
create_window
(
NULL
,
NULL
,
DESKTOP_ATOM
,
0
)))
{
detach_window_thread
(
desktop
->
top_window
);
desktop
->
top_window
->
style
=
WS_POPUP
|
WS_VISIBLE
|
WS_CLIPSIBLINGS
|
WS_CLIPCHILDREN
;
}
}
if
(
win
)
reply
->
handle
=
win
->
handle
;
if
(
!
desktop
->
msg_window
&&
req
->
force
)
/* create it */
{
static
const
WCHAR
messageW
[]
=
{
'M'
,
'e'
,
's'
,
's'
,
'a'
,
'g'
,
'e'
};
static
const
struct
unicode_str
name
=
{
messageW
,
sizeof
(
messageW
)
};
atom_t
atom
=
add_global_atom
(
NULL
,
&
name
);
if
(
atom
&&
(
desktop
->
msg_window
=
create_window
(
NULL
,
NULL
,
atom
,
0
)))
{
detach_window_thread
(
desktop
->
msg_window
);
desktop
->
msg_window
->
style
=
WS_POPUP
|
WS_CLIPSIBLINGS
|
WS_CLIPCHILDREN
;
}
}
reply
->
top_window
=
desktop
->
top_window
?
desktop
->
top_window
->
handle
:
0
;
reply
->
msg_window
=
desktop
->
msg_window
?
desktop
->
msg_window
->
handle
:
0
;
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