partially implemented IsHungAppWindow()
authorThomas Bluemel <thomas@reactsoft.com>
Fri, 2 Apr 2004 23:54:26 +0000 (23:54 +0000)
committerThomas Bluemel <thomas@reactsoft.com>
Fri, 2 Apr 2004 23:54:26 +0000 (23:54 +0000)
svn path=/trunk/; revision=8956

reactos/include/win32k/ntuser.h
reactos/lib/user32/windows/window.c
reactos/subsys/win32k/ntuser/window.c

index 9be873f..b20c478 100644 (file)
@@ -1065,6 +1065,9 @@ NtUserQueryUserCounters(
   DWORD Unknown3,
   DWORD Unknown4);
 
+#define QUERY_WINDOW_UNIQUE_PROCESS_ID 0x00
+#define QUERY_WINDOW_UNIQUE_THREAD_ID  0x01
+#define QUERY_WINDOW_ISHUNG    0x04
 DWORD
 STDCALL
 NtUserQueryWindow(
index a91fbb5..72bb81d 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: window.c,v 1.104 2004/04/02 22:16:09 weiden Exp $
+/* $Id: window.c,v 1.105 2004/04/02 23:54:26 weiden Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS user32.dll
@@ -1456,14 +1456,13 @@ InternalGetWindowText(HWND hWnd, LPWSTR lpString, int nMaxCount)
 }
 
 /*
- * @unimplemented
+ * @implemented
  */
 BOOL
 STDCALL
 IsHungAppWindow(HWND hwnd)
 {
-  /* FIXME: ReactOS doesnt identify hung app windows yet */
-  return FALSE;
+  return (NtUserQueryWindow(hwnd, QUERY_WINDOW_ISHUNG) != 0);
 }
 
 /*
index 47a95ba..5b9ebc2 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: window.c,v 1.208 2004/04/02 20:51:08 weiden Exp $
+/* $Id: window.c,v 1.209 2004/04/02 23:54:26 weiden Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -3200,14 +3200,18 @@ NtUserQueryWindow(HWND hWnd, DWORD Index)
 
    switch(Index)
    {
-      case 0x00:
+      case QUERY_WINDOW_UNIQUE_PROCESS_ID:
          Result = (DWORD)IntGetWndProcessId(Window);
          break;
 
-      case 0x01:
+      case QUERY_WINDOW_UNIQUE_THREAD_ID:
          Result = (DWORD)IntGetWndThreadId(Window);
          break;
 
+      case QUERY_WINDOW_ISHUNG:
+         Result = (DWORD)MsqIsHung(Window->MessageQueue);
+         break;
+
       default:
          Result = (DWORD)NULL;
          break;