user32: Draw the whole button only if requested.

Dmitry Timoshkov dmitry at codeweavers.com
Wed Jul 22 01:22:05 CDT 2009


The application I'm working on relies on this, it doesn't expect that
button completely redraws itself on WM_SETFOCUS/WM_KILLFOCUS messages.
---
 dlls/user32/button.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dlls/user32/button.c b/dlls/user32/button.c
index a61a4e7..6727a2f 100644
--- a/dlls/user32/button.c
+++ b/dlls/user32/button.c
@@ -847,7 +847,8 @@ static void PB_Paint( HWND hwnd, HDC hDC, UINT action )
     if (state & (BUTTON_CHECKED | BUTTON_3STATE))
         uState |= DFCS_CHECKED;
 
-    DrawFrameControl( hDC, &rc, DFC_BUTTON, uState );
+    if (action == ODA_DRAWENTIRE)
+        DrawFrameControl( hDC, &rc, DFC_BUTTON, uState );
 
     focus_rect = rc;
 
-- 
1.6.3.3




More information about the wine-patches mailing list