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
e735e199
Commit
e735e199
authored
Dec 28, 2007
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Dec 28, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Reimplement IsHungAppWindow.
parent
3c985a44
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
65 additions
and
3 deletions
+65
-3
message.c
dlls/user32/message.c
+9
-2
server_protocol.h
include/wine/server_protocol.h
+17
-1
protocol.def
server/protocol.def
+8
-0
queue.c
server/queue.c
+16
-0
request.h
server/request.h
+2
-0
trace.c
server/trace.c
+13
-0
No files found.
dlls/user32/message.c
View file @
e735e199
...
...
@@ -3556,6 +3556,13 @@ BOOL WINAPI GetGUIThreadInfo( DWORD id, GUITHREADINFO *info )
*/
BOOL
WINAPI
IsHungAppWindow
(
HWND
hWnd
)
{
DWORD_PTR
dwResult
;
return
!
SendMessageTimeoutA
(
hWnd
,
WM_NULL
,
0
,
0
,
SMTO_ABORTIFHUNG
,
5000
,
&
dwResult
);
BOOL
ret
;
SERVER_START_REQ
(
is_window_hung
)
{
req
->
win
=
hWnd
;
ret
=
!
wine_server_call_err
(
req
)
&&
reply
->
is_hung
;
}
SERVER_END_REQ
;
return
ret
;
}
include/wine/server_protocol.h
View file @
e735e199
...
...
@@ -2597,6 +2597,19 @@ struct kill_win_timer_reply
struct
is_window_hung_request
{
struct
request_header
__header
;
user_handle_t
win
;
};
struct
is_window_hung_reply
{
struct
reply_header
__header
;
int
is_hung
;
};
struct
get_serial_info_request
{
struct
request_header
__header
;
...
...
@@ -4382,6 +4395,7 @@ enum request
REQ_get_message_reply
,
REQ_set_win_timer
,
REQ_kill_win_timer
,
REQ_is_window_hung
,
REQ_get_serial_info
,
REQ_set_serial_info
,
REQ_register_async
,
...
...
@@ -4620,6 +4634,7 @@ union generic_request
struct
get_message_reply_request
get_message_reply_request
;
struct
set_win_timer_request
set_win_timer_request
;
struct
kill_win_timer_request
kill_win_timer_request
;
struct
is_window_hung_request
is_window_hung_request
;
struct
get_serial_info_request
get_serial_info_request
;
struct
set_serial_info_request
set_serial_info_request
;
struct
register_async_request
register_async_request
;
...
...
@@ -4856,6 +4871,7 @@ union generic_reply
struct
get_message_reply_reply
get_message_reply_reply
;
struct
set_win_timer_reply
set_win_timer_reply
;
struct
kill_win_timer_reply
kill_win_timer_reply
;
struct
is_window_hung_reply
is_window_hung_reply
;
struct
get_serial_info_reply
get_serial_info_reply
;
struct
set_serial_info_reply
set_serial_info_reply
;
struct
register_async_reply
register_async_reply
;
...
...
@@ -4960,6 +4976,6 @@ union generic_reply
struct
add_fd_completion_reply
add_fd_completion_reply
;
};
#define SERVER_PROTOCOL_VERSION 33
4
#define SERVER_PROTOCOL_VERSION 33
5
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/protocol.def
View file @
e735e199
...
...
@@ -1925,6 +1925,14 @@ enum message_type
@END
/* check if the thread owning the window is hung */
@REQ(is_window_hung)
user_handle_t win; /* window handle */
@REPLY
int is_hung;
@END
/* Retrieve info about a serial port */
@REQ(get_serial_info)
obj_handle_t handle; /* handle to comm port */
...
...
server/queue.c
View file @
e735e199
...
...
@@ -1562,6 +1562,22 @@ void post_win_event( struct thread *thread, unsigned int event,
}
}
/* check if the thread owning the window is hung */
DECL_HANDLER
(
is_window_hung
)
{
struct
thread
*
thread
;
thread
=
get_window_thread
(
req
->
win
);
if
(
thread
)
{
reply
->
is_hung
=
is_queue_hung
(
thread
->
queue
);
release_object
(
thread
);
}
else
reply
->
is_hung
=
0
;
}
/* get the message queue of the current thread */
DECL_HANDLER
(
get_msg_queue
)
{
...
...
server/request.h
View file @
e735e199
...
...
@@ -239,6 +239,7 @@ DECL_HANDLER(accept_hardware_message);
DECL_HANDLER
(
get_message_reply
);
DECL_HANDLER
(
set_win_timer
);
DECL_HANDLER
(
kill_win_timer
);
DECL_HANDLER
(
is_window_hung
);
DECL_HANDLER
(
get_serial_info
);
DECL_HANDLER
(
set_serial_info
);
DECL_HANDLER
(
register_async
);
...
...
@@ -476,6 +477,7 @@ static const req_handler req_handlers[REQ_NB_REQUESTS] =
(
req_handler
)
req_get_message_reply
,
(
req_handler
)
req_set_win_timer
,
(
req_handler
)
req_kill_win_timer
,
(
req_handler
)
req_is_window_hung
,
(
req_handler
)
req_get_serial_info
,
(
req_handler
)
req_set_serial_info
,
(
req_handler
)
req_register_async
,
...
...
server/trace.c
View file @
e735e199
...
...
@@ -2412,6 +2412,16 @@ static void dump_kill_win_timer_request( const struct kill_win_timer_request *re
fprintf
(
stderr
,
" id=%lx"
,
req
->
id
);
}
static
void
dump_is_window_hung_request
(
const
struct
is_window_hung_request
*
req
)
{
fprintf
(
stderr
,
" win=%p"
,
req
->
win
);
}
static
void
dump_is_window_hung_reply
(
const
struct
is_window_hung_reply
*
req
)
{
fprintf
(
stderr
,
" is_hung=%d"
,
req
->
is_hung
);
}
static
void
dump_get_serial_info_request
(
const
struct
get_serial_info_request
*
req
)
{
fprintf
(
stderr
,
" handle=%p"
,
req
->
handle
);
...
...
@@ -3878,6 +3888,7 @@ static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
(
dump_func
)
dump_get_message_reply_request
,
(
dump_func
)
dump_set_win_timer_request
,
(
dump_func
)
dump_kill_win_timer_request
,
(
dump_func
)
dump_is_window_hung_request
,
(
dump_func
)
dump_get_serial_info_request
,
(
dump_func
)
dump_set_serial_info_request
,
(
dump_func
)
dump_register_async_request
,
...
...
@@ -4112,6 +4123,7 @@ static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
(
dump_func
)
dump_get_message_reply_reply
,
(
dump_func
)
dump_set_win_timer_reply
,
(
dump_func
)
0
,
(
dump_func
)
dump_is_window_hung_reply
,
(
dump_func
)
dump_get_serial_info_reply
,
(
dump_func
)
0
,
(
dump_func
)
0
,
...
...
@@ -4346,6 +4358,7 @@ static const char * const req_names[REQ_NB_REQUESTS] = {
"get_message_reply"
,
"set_win_timer"
,
"kill_win_timer"
,
"is_window_hung"
,
"get_serial_info"
,
"set_serial_info"
,
"register_async"
,
...
...
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