comctl32[2/2]: toolbar: small fix in TOOLBAR_StyleChanged

Mikołaj Zalewski mikolaj at zalewski.pl
Thu Sep 28 13:58:19 CDT 2006


As infoPtr->dwStyle was already overwritten with lpStyle->styleNew, the 
check (infoPtr->dwStyle ^ lpStyle->styleNew) made no sense
-------------- next part --------------
diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c
index 4f725ed..945b40b 100644
--- a/dlls/comctl32/toolbar.c
+++ b/dlls/comctl32/toolbar.c
@@ -6741,6 +6741,8 @@ TOOLBAR_StyleChanged (HWND hwnd, INT nTy
 
     if (nType == GWL_STYLE)
     {
+        DWORD dwOldStyle = infoPtr->dwStyle;
+
         if (lpStyle->styleNew & TBSTYLE_LIST)
             infoPtr->dwDTFlags = DT_LEFT | DT_VCENTER | DT_SINGLELINE | DT_END_ELLIPSIS;
         else
@@ -6753,7 +6755,7 @@ TOOLBAR_StyleChanged (HWND hwnd, INT nTy
         infoPtr->dwStyle = lpStyle->styleNew;
 
         /* only resize if one of the CCS_* styles was changed */
-        if ((infoPtr->dwStyle ^ lpStyle->styleNew) & COMMON_STYLES)
+        if ((dwOldStyle ^ lpStyle->styleNew) & COMMON_STYLES)
         {
             TOOLBAR_AutoSize (hwnd);
     
-- 
1.4.2.1


More information about the wine-patches mailing list