Alexandre Julliard : user32: Check both A and W proc for previously allocated winprocs.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Jul 13 08:30:09 CDT 2007


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Jul 12 15:45:00 2007 +0200

user32: Check both A and W proc for previously allocated winprocs.

Some apps get a winproc as A and then set it again as W.

---

 dlls/user32/winproc.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/user32/winproc.c b/dlls/user32/winproc.c
index 59d432d..c6e49f2 100644
--- a/dlls/user32/winproc.c
+++ b/dlls/user32/winproc.c
@@ -98,8 +98,9 @@ static inline WINDOWPROC *find_winproc( WNDPROC funcA, WNDPROC funcW )
 
     for (i = 0; i < winproc_used; i++)
     {
-        if (funcA && winproc_array[i].procA != funcA) continue;
-        if (funcW && winproc_array[i].procW != funcW) continue;
+        /* match either proc, some apps confuse A and W */
+        if (funcA && winproc_array[i].procA != funcA && winproc_array[i].procW != funcA) continue;
+        if (funcW && winproc_array[i].procA != funcW && winproc_array[i].procW != funcW) continue;
         return &winproc_array[i];
     }
     return NULL;




More information about the wine-cvs mailing list