Mikołaj Zalewski : comctl32: statusbar: Optimize STATUSBAR_RefreshPart.
Alexandre Julliard
julliard at winehq.org
Wed Jul 23 07:09:46 CDT 2008
Module: wine
Branch: master
Commit: 9a70306c5356fa90a2688735ebf8cd4729f6d2ad
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9a70306c5356fa90a2688735ebf8cd4729f6d2ad
Author: Mikołaj Zalewski <mikolaj at zalewski.pl>
Date: Tue Jul 22 21:30:54 2008 +0200
comctl32: statusbar: Optimize STATUSBAR_RefreshPart.
---
dlls/comctl32/status.c | 19 ++++---------------
1 files changed, 4 insertions(+), 15 deletions(-)
diff --git a/dlls/comctl32/status.c b/dlls/comctl32/status.c
index b0fcc35..c1214bb 100644
--- a/dlls/comctl32/status.c
+++ b/dlls/comctl32/status.c
@@ -252,15 +252,15 @@ static void
STATUSBAR_RefreshPart (const STATUS_INFO *infoPtr, HDC hdc, const STATUSWINDOWPART *part, int itemID)
{
HBRUSH hbrBk;
- HFONT hOldFont;
HTHEME theme;
TRACE("item %d\n", itemID);
- if (!IsWindowVisible (infoPtr->Self))
- return;
if (part->bound.right < part->bound.left) return;
+ if (!RectVisible(hdc, &part->bound))
+ return;
+
if ((theme = GetWindowTheme (infoPtr->Self)))
{
RECT cr;
@@ -278,18 +278,7 @@ STATUSBAR_RefreshPart (const STATUS_INFO *infoPtr, HDC hdc, const STATUSWINDOWPA
DeleteObject (hbrBk);
}
- hOldFont = SelectObject (hdc, infoPtr->hFont ? infoPtr->hFont : infoPtr->hDefaultFont);
-
- STATUSBAR_DrawPart (infoPtr, hdc, part, itemID);
-
- SelectObject (hdc, hOldFont);
-
- if (GetWindowLongW (infoPtr->Self, GWL_STYLE) & SBARS_SIZEGRIP) {
- RECT rect;
-
- GetClientRect (infoPtr->Self, &rect);
- STATUSBAR_DrawSizeGrip (theme, hdc, &rect);
- }
+ STATUSBAR_DrawPart (infoPtr, hdc, part, itemID);
}
More information about the wine-cvs
mailing list