wine/dlls/user focus.c
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Nov 15 10:53:26 CST 2005
ChangeSet ID: 21280
CVSROOT: /opt/cvs-commit
Module name: wine
Changes by: julliard at winehq.org 2005/11/15 10:53:26
Modified files:
dlls/user : focus.c
Log message:
Dmitry Timoshkov <dmitry at codeweavers.com>
Do not change focus if the being activated window is no longer
active.
Patch: http://cvs.winehq.org/patch.py?id=21280
Old revision New revision Changes Path
1.15 1.16 +9 -3 wine/dlls/user/focus.c
Index: wine/dlls/user/focus.c
diff -u -p wine/dlls/user/focus.c:1.15 wine/dlls/user/focus.c:1.16
--- wine/dlls/user/focus.c:1.15 15 Nov 2005 16:53:26 -0000
+++ wine/dlls/user/focus.c 15 Nov 2005 16:53:26 -0000
@@ -161,9 +161,15 @@ static BOOL set_active_window( HWND hwnd
/* now change focus if necessary */
if (focus)
{
- HWND curfocus = GetFocus();
- if (!curfocus || !hwnd || GetAncestor( curfocus, GA_ROOT ) != hwnd)
- set_focus_window( hwnd );
+ GUITHREADINFO info;
+
+ GetGUIThreadInfo( GetCurrentThreadId(), &info );
+ /* Do not change focus if the window is no more active */
+ if (hwnd == info.hwndActive)
+ {
+ if (!info.hwndFocus || !hwnd || GetAncestor( info.hwndFocus, GA_ROOT ) != hwnd)
+ set_focus_window( hwnd );
+ }
}
return TRUE;
More information about the wine-cvs
mailing list