[PATCH 1/2] comctl32: Use wine_dbgstr_rect() to trace RECTs.

Nikolay Sivov nsivov at codeweavers.com
Tue Apr 19 05:07:16 CDT 2016


Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
 dlls/comctl32/pager.c |  9 ++-------
 dlls/comctl32/rebar.c | 12 ++----------
 dlls/comctl32/tab.c   | 20 +++++---------------
 3 files changed, 9 insertions(+), 32 deletions(-)

diff --git a/dlls/comctl32/pager.c b/dlls/comctl32/pager.c
index bd9eb68..ced32be 100644
--- a/dlls/comctl32/pager.c
+++ b/dlls/comctl32/pager.c
@@ -665,13 +665,8 @@ PAGER_NCCalcSize(PAGER_INFO* infoPtr, WPARAM wParam, LPRECT lpRect)
 	    lpRect->bottom -= infoPtr->nButtonSize;
     }
 
-    TRACE("nPos=%d, nHeight=%d, window=%s\n",
-          infoPtr->nPos, infoPtr->nHeight,
-          wine_dbgstr_rect(&rcWindow));
-
-    TRACE("[%p] client rect set to %dx%d at (%d,%d) BtnState[%d,%d]\n",
-	  infoPtr->hwndSelf, lpRect->right-lpRect->left, lpRect->bottom-lpRect->top,
-	  lpRect->left, lpRect->top,
+    TRACE("nPos=%d, nHeight=%d, window=%s\n", infoPtr->nPos, infoPtr->nHeight, wine_dbgstr_rect(&rcWindow));
+    TRACE("[%p] client rect set to %s BtnState[%d,%d]\n", infoPtr->hwndSelf, wine_dbgstr_rect(lpRect),
 	  infoPtr->TLbtnState, infoPtr->BRbtnState);
 
     return 0;
diff --git a/dlls/comctl32/rebar.c b/dlls/comctl32/rebar.c
index 466acae..de8155a 100644
--- a/dlls/comctl32/rebar.c
+++ b/dlls/comctl32/rebar.c
@@ -806,15 +806,11 @@ REBAR_CalcHorzBand (const REBAR_INFO *infoPtr, UINT rstart, UINT rend)
 
       /* flag if notify required and invalidate rectangle */
       if (lpBand->fDraw & NTF_INVALIDATE) {
-          TRACE("invalidating (%d,%d)-(%d,%d)\n",
-		lpBand->rcBand.left,
-		lpBand->rcBand.top,
-		lpBand->rcBand.right + SEP_WIDTH,
-		lpBand->rcBand.bottom + SEP_WIDTH);
 	  lpBand->fDraw &= ~NTF_INVALIDATE;
 	  work = lpBand->rcBand;
 	  work.right += SEP_WIDTH;
 	  work.bottom += SEP_WIDTH;
+	  TRACE("invalidating %s\n", wine_dbgstr_rect(&work));
 	  InvalidateRect(infoPtr->hwndSelf, &work, TRUE);
 	  if (lpBand->hwndChild) InvalidateRect(lpBand->hwndChild, NULL, TRUE);
       }
@@ -927,15 +923,11 @@ REBAR_CalcVertBand (const REBAR_INFO *infoPtr, UINT rstart, UINT rend)
 	}
 
 	if (lpBand->fDraw & NTF_INVALIDATE) {
-            TRACE("invalidating (%d,%d)-(%d,%d)\n",
-                  rcBand.left,
-                  rcBand.top,
-                  rcBand.right + SEP_WIDTH,
-                  rcBand.bottom + SEP_WIDTH);
 	    lpBand->fDraw &= ~NTF_INVALIDATE;
 	    work = rcBand;
 	    work.bottom += SEP_WIDTH;
 	    work.right += SEP_WIDTH;
+	    TRACE("invalidating %s\n", wine_dbgstr_rect(&work));
 	    InvalidateRect(infoPtr->hwndSelf, &work, TRUE);
 	    if (lpBand->hwndChild) InvalidateRect(lpBand->hwndChild, NULL, TRUE);
 	}
diff --git a/dlls/comctl32/tab.c b/dlls/comctl32/tab.c
index a9c3b7b..ead3f56 100644
--- a/dlls/comctl32/tab.c
+++ b/dlls/comctl32/tab.c
@@ -1243,8 +1243,7 @@ static void TAB_SetItemBounds (TAB_INFO *infoPtr)
         tabwidth = max(tabwidth, infoPtr->tabMinWidth);
 
       curr->rect.right = curr->rect.left + tabwidth;
-      TRACE("for <%s>, l,r=%d,%d\n",
-	  debugstr_w(curr->pszText), curr->rect.left, curr->rect.right);
+      TRACE("for <%s>, rect %s\n", debugstr_w(curr->pszText), wine_dbgstr_rect(&curr->rect));
     }
 
     /*
@@ -1263,8 +1262,7 @@ static void TAB_SetItemBounds (TAB_INFO *infoPtr)
 
 	curr->rect.left = 0;
         curItemRowCount++;
-	TRACE("wrapping <%s>, l,r=%d,%d\n", debugstr_w(curr->pszText),
-	    curr->rect.left, curr->rect.right);
+	TRACE("wrapping <%s>, rect %s\n", debugstr_w(curr->pszText), wine_dbgstr_rect(&curr->rect));
     }
 
     curr->rect.bottom = 0;
@@ -1377,9 +1375,7 @@ static void TAB_SetItemBounds (TAB_INFO *infoPtr)
           else
             curItemLeftPos = curr->rect.right;
 
-          TRACE("arranging <%s>, l,r=%d,%d, row=%d\n",
-	      debugstr_w(curr->pszText), curr->rect.left,
-	      curr->rect.right, curr->rect.top);
+          TRACE("arranging <%s>, rect %s\n", debugstr_w(curr->pszText), wine_dbgstr_rect(&curr->rect));
       }
 
       /*
@@ -1429,9 +1425,7 @@ static void TAB_SetItemBounds (TAB_INFO *infoPtr)
 	      item->rect.left += iCount * widthDiff;
 	      item->rect.right += (iCount + 1) * widthDiff;
 
-              TRACE("adjusting 1 <%s>, l,r=%d,%d\n",
-		  debugstr_w(item->pszText),
-		  item->rect.left, item->rect.right);
+              TRACE("adjusting 1 <%s>, rect %s\n", debugstr_w(item->pszText), wine_dbgstr_rect(&item->rect));
 
 	    }
 	    TAB_GetItem(infoPtr, iIndex - 1)->rect.right += remainder;
@@ -1441,13 +1435,9 @@ static void TAB_SetItemBounds (TAB_INFO *infoPtr)
 	    start->rect.left = clientRect.left;
 	    start->rect.right = clientRect.right - 4;
 
-            TRACE("adjusting 2 <%s>, l,r=%d,%d\n",
-		debugstr_w(start->pszText),
-		start->rect.left, start->rect.right);
-
+            TRACE("adjusting 2 <%s>, rect %s\n", debugstr_w(start->pszText), wine_dbgstr_rect(&start->rect));
 	  }
 
-
 	  iIndexStart = iIndexEnd;
 	}
       }
-- 
2.8.0.rc3




More information about the wine-patches mailing list