Dmitry Timoshkov : user32: Do not change focus if the window is no longer active.

Alexandre Julliard julliard at winehq.org
Wed Nov 19 08:34:59 CST 2008


Module: wine
Branch: master
Commit: 5dfcadd7a3af47f61d056441407548ae8aef2004
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=5dfcadd7a3af47f61d056441407548ae8aef2004

Author: Dmitry Timoshkov <dmitry at codeweavers.com>
Date:   Wed Nov 19 13:52:36 2008 +0800

user32: Do not change focus if the window is no longer active.

---

 dlls/user32/focus.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/dlls/user32/focus.c b/dlls/user32/focus.c
index 3253a87..36f44f3 100644
--- a/dlls/user32/focus.c
+++ b/dlls/user32/focus.c
@@ -276,6 +276,9 @@ HWND WINAPI SetFocus( HWND hwnd )
         {
             if (!set_active_window( hwndTop, NULL, FALSE, FALSE )) return 0;
             if (!IsWindow( hwnd )) return 0;  /* Abort if window destroyed */
+
+            /* Do not change focus if the window is no longer active */
+            if (hwndTop != GetActiveWindow()) return 0;
         }
     }
     else /* NULL hwnd passed in */




More information about the wine-cvs mailing list