From: Jacob Czekalla jacobczekalla@gmail.com
--- dlls/comctl32/status.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/dlls/comctl32/status.c b/dlls/comctl32/status.c index 5251f3677b0..392c7416eca 100644 --- a/dlls/comctl32/status.c +++ b/dlls/comctl32/status.c @@ -62,6 +62,8 @@ typedef struct HWND Notify; WORD numParts; UINT height; + UINT width; + UINT y; UINT minHeight; /* at least MIN_PANE_HEIGHT, can be increased by SB_SETMINHEIGHT */ BOOL simple; HWND hwndToolTip; @@ -865,6 +867,8 @@ STATUSBAR_WMCreate (HWND hwnd, const CREATESTRUCTA *lpCreate) infoPtr->verticalBorder = VERT_BORDER; infoPtr->horizontalGap = HORZ_GAP; infoPtr->minHeight = GetSystemMetrics(SM_CYSIZE); + infoPtr->width = 0; + infoPtr->y = 0; if (infoPtr->minHeight & 1) infoPtr->minHeight--;
STATUSBAR_NotifyFormat(infoPtr, infoPtr->Notify, NF_REQUERY); @@ -1050,6 +1054,7 @@ STATUSBAR_WMSize (STATUS_INFO *infoPtr, WORD flags) { INT width, x, y; RECT parent_rect; + RECT update_rect;
/* Need to resize width to match parent */ TRACE("flags %04x\n", flags); @@ -1068,8 +1073,20 @@ STATUSBAR_WMSize (STATUS_INFO *infoPtr, WORD flags) width = parent_rect.right - parent_rect.left; x = parent_rect.left; y = parent_rect.bottom - infoPtr->height; - MoveWindow (infoPtr->Self, x, y, width, infoPtr->height, TRUE); + MoveWindow (infoPtr->Self, x, y, width, infoPtr->height, FALSE); + if(y != infoPtr->y) + InvalidateRect(infoPtr->Self, NULL, FALSE); + else + { + update_rect.left = min(infoPtr->width-HORZ_GAP, width); + update_rect.right = max(width, infoPtr->width-HORZ_GAP); + update_rect.top = infoPtr->height; + update_rect.bottom = 0; + InvalidateRect(infoPtr->Self, &update_rect, FALSE); + } STATUSBAR_SetPartBounds (infoPtr); + infoPtr->width = width; + infoPtr->y = y; return TRUE; }