Huw Davies : comctl32: Don' t use the RECT from the custom draw structure when referring to the button alone.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Jul 8 15:06:45 CDT 2014
Module: wine
Branch: master
Commit: d130ba09fa3912e9dcd262950d89a743a5daa398
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d130ba09fa3912e9dcd262950d89a743a5daa398
Author: Huw Davies <huw at codeweavers.com>
Date: Tue Jul 8 13:53:50 2014 +0100
comctl32: Don't use the RECT from the custom draw structure when referring to the button alone.
---
dlls/comctl32/toolbar.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c
index e716bab..c90c4bb 100644
--- a/dlls/comctl32/toolbar.c
+++ b/dlls/comctl32/toolbar.c
@@ -748,10 +748,10 @@ TOOLBAR_DrawImage(const TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr, INT left, I
/* draws a blank frame for a toolbar button */
static void
-TOOLBAR_DrawFrame(const TOOLBAR_INFO *infoPtr, const NMTBCUSTOMDRAW *tbcd, DWORD dwItemCDFlag)
+TOOLBAR_DrawFrame(const TOOLBAR_INFO *infoPtr, const NMTBCUSTOMDRAW *tbcd, const RECT *rect, DWORD dwItemCDFlag)
{
HDC hdc = tbcd->nmcd.hdc;
- RECT rc = tbcd->nmcd.rc;
+ RECT rc = *rect;
/* if the state is disabled or indeterminate then the button
* cannot have an interactive look like pressed or hot */
BOOL non_interactive_state = (tbcd->nmcd.uItemState & CDIS_DISABLED) ||
@@ -1021,10 +1021,10 @@ TOOLBAR_DrawButton (const TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr, HDC hdc,
|| (drawSepDropDownArrow && btnPtr->bDropDownPressed))
stateId = TS_HOT;
- DrawThemeBackground (theme, hdc, partId, stateId, &tbcd.nmcd.rc, NULL);
+ DrawThemeBackground (theme, hdc, partId, stateId, &rc, NULL);
}
else
- TOOLBAR_DrawFrame(infoPtr, &tbcd, dwItemCDFlag);
+ TOOLBAR_DrawFrame(infoPtr, &tbcd, &rc, dwItemCDFlag);
if (drawSepDropDownArrow)
{
More information about the wine-cvs
mailing list