[NtUser]
authorJames Tabor <james.tabor@reactos.org>
Tue, 4 Nov 2014 05:21:41 +0000 (05:21 +0000)
committerJames Tabor <james.tabor@reactos.org>
Tue, 4 Nov 2014 05:21:41 +0000 (05:21 +0000)
- Capture is already set. Trouble shooting CORE-8299 and CORE-3247.
- Correct spellings and adding traces.

svn path=/trunk/; revision=65238

reactos/win32ss/user/ntuser/focus.c

index 3da9a22..eb43ca8 100644 (file)
@@ -25,6 +25,9 @@ IsFGLocked(VOID)
    return (gppiLockSFW || guSFWLockCount);
 }
 
    return (gppiLockSFW || guSFWLockCount);
 }
 
+/*
+  Get capture window via foreground Queue.
+*/
 HWND FASTCALL
 IntGetCaptureWindow(VOID)
 {
 HWND FASTCALL
 IntGetCaptureWindow(VOID)
 {
@@ -701,7 +704,7 @@ co_IntSetActiveWindow(PWND Wnd OPTIONAL, BOOL bMouse, BOOL bFocus, BOOL Async)
         (Wnd && !VerifyWnd(Wnd)) ||
         ThreadQueue != pti->MessageQueue )
    {
         (Wnd && !VerifyWnd(Wnd)) ||
         ThreadQueue != pti->MessageQueue )
    {
-      ERR("SetActiveWindow: Summery ERROR, active state changed!\n");
+      ERR("SetActiveWindow: Summary ERROR, active state changed!\n");
       return FALSE;
    }
 
       return FALSE;
    }
 
@@ -937,6 +940,7 @@ co_UserSetCapture(HWND hWnd)
    {
       if (Window->head.pti->MessageQueue != ThreadQueue)
       {
    {
       if (Window->head.pti->MessageQueue != ThreadQueue)
       {
+         ERR("Window Thread dos not match Current!\n");
          return NULL;
       }
    }
          return NULL;
       }
    }
@@ -957,14 +961,11 @@ co_UserSetCapture(HWND hWnd)
    {
       if (ThreadQueue->MenuOwner && Window) ThreadQueue->QF_flags |= QF_CAPTURELOCKED;
 
    {
       if (ThreadQueue->MenuOwner && Window) ThreadQueue->QF_flags |= QF_CAPTURELOCKED;
 
-      //co_IntPostOrSendMessage(hWndPrev, WM_CAPTURECHANGED, 0, (LPARAM)hWnd);
       co_IntSendMessage(hWndPrev, WM_CAPTURECHANGED, 0, (LPARAM)hWnd);
 
       ThreadQueue->QF_flags &= ~QF_CAPTURELOCKED;
    }
 
       co_IntSendMessage(hWndPrev, WM_CAPTURECHANGED, 0, (LPARAM)hWnd);
 
       ThreadQueue->QF_flags &= ~QF_CAPTURELOCKED;
    }
 
-   ThreadQueue->spwndCapture = Window;
-
    if (hWnd == NULL) // Release mode.
    {
       MOUSEINPUT mi;
    if (hWnd == NULL) // Release mode.
    {
       MOUSEINPUT mi;