[Win32k]
authorJames Tabor <james.tabor@reactos.org>
Thu, 7 Jun 2012 11:52:13 +0000 (11:52 +0000)
committerJames Tabor <james.tabor@reactos.org>
Thu, 7 Jun 2012 11:52:13 +0000 (11:52 +0000)
- Turn off a debug print. Fixed wine Edit test_edit_control_2 SetFocus return and one more in Msg test_SetFocus.

svn path=/trunk/; revision=56705

reactos/win32ss/user/ntuser/focus.c
reactos/win32ss/user/ntuser/window.c

index 6c3f0a8..65ebe51 100644 (file)
@@ -596,12 +596,9 @@ co_UserSetFocus(PWND Window)
       }
 
       // Check again! SetActiveWindow could have set the focus via WM_ACTIVATE.
-      if (ThreadQueue->spwndFocus && ThreadQueue->spwndFocus == Window)
-      {
-         hWndPrev = UserHMGetHandle(ThreadQueue->spwndFocus);
-      }
+      hWndPrev = ThreadQueue->spwndFocus ? UserHMGetHandle(ThreadQueue->spwndFocus) : 0;
 
-       /* check if the specified window can be set in the input data of a given queue */
+      /* check if the specified window can be set in the input data of a given queue */
       if (ThreadQueue == Window->head.pti->MessageQueue)
          /* set the current thread focus window */
          ThreadQueue->spwndFocus = Window;
index 3f110ce..dbe7421 100644 (file)
@@ -2413,7 +2413,7 @@ BOOLEAN FASTCALL co_UserDestroyWindow(PWND Window)
    if (!co_WinPosShowWindow(Window, SW_HIDE))
    {  // Rule #1.
       if (ti->MessageQueue->spwndActive == Window && ti->MessageQueue == IntGetFocusMessageQueue())
-      {  ERR("DestroyWindow AOW\n");
+      {  //ERR("DestroyWindow AOW\n");
          co_WinPosActivateOtherWindow(Window);
       }
    }