user32: Button should lose highlighting on focus loss

Nikolay Sivov bunglehead at gmail.com
Thu Mar 5 17:39:36 CST 2009


You could easily reproduce this issue:
    - highlight any checkbox with space key
    - keep space pressed and changed focus (with arrows or tab)
After that checkbox will be unfocused but still highlighted wich is a bug.
The same applies of course to radiobuttons too.

Changelog:
    - Button should lose highlighting on focus loss

>From 76b376b89129cff073d44f5017834680ae8457c1 Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <bunglehead at gmail.com>
Date: Thu, 5 Mar 2009 18:10:26 -0500
Subject: Button should lose highlighting on focus loss

---
 dlls/user32/button.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/dlls/user32/button.c b/dlls/user32/button.c
index 84b54ab..bfa9cd5 100644
--- a/dlls/user32/button.c
+++ b/dlls/user32/button.c
@@ -436,6 +436,7 @@ static LRESULT ButtonWndProc_common(HWND hWnd, UINT uMsg,
 
     case WM_KILLFOCUS:
         TRACE("WM_KILLFOCUS %p\n",hWnd);
+        SendMessageW( hWnd, BM_SETSTATE, FALSE, 0 );
         state = get_button_state( hWnd );
         set_button_state( hWnd, state & ~BUTTON_HASFOCUS );
 	paint_button( hWnd, btn_type, ODA_FOCUS );
-- 
1.5.6.5





More information about the wine-patches mailing list