user32: Reimplement IsHungAppWindow
Dmitry Timoshkov
dmitry at codeweavers.com
Thu Dec 27 20:59:13 CST 2007
Hello,
Changelog:
user32: Reimplement IsHungAppWindow.
---
diff --git a/dlls/user32/message.c b/dlls/user32/message.c
index d3f4a3a..67bf10e 100644
--- a/dlls/user32/message.c
+++ b/dlls/user32/message.c
@@ -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;
}
diff --git a/server/protocol.def b/server/protocol.def
index aa10f89..bfd7242 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -1925,6 +1925,14 @@ enum message_type
@END
+/* check if the thread owning the window is hung */
+ at REQ(is_window_hung)
+ user_handle_t win; /* window handle */
+ at REPLY
+ int is_hung;
+ at END
+
+
/* Retrieve info about a serial port */
@REQ(get_serial_info)
obj_handle_t handle; /* handle to comm port */
diff --git a/server/queue.c b/server/queue.c
index d837e84..a32bd7e 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -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)
{
--
1.5.3.7
More information about the wine-patches
mailing list