Lei Zhang : comctl32: Set listview focus on WM_LBUTTONUP instead of WM_LBUTTONDOWN.

Alexandre Julliard julliard at winehq.org
Thu Aug 21 10:02:59 CDT 2008


Module: wine
Branch: master
Commit: 098dc7b3302f39c5500d644615a6f4c37d328ce0
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=098dc7b3302f39c5500d644615a6f4c37d328ce0

Author: Lei Zhang <thestig at google.com>
Date:   Mon Aug 18 16:05:27 2008 -0700

comctl32: Set listview focus on WM_LBUTTONUP instead of WM_LBUTTONDOWN.

---

 dlls/comctl32/listview.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index 213b569..c620892 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -8588,10 +8588,7 @@ static LRESULT LISTVIEW_LButtonDown(LISTVIEW_INFO *infoPtr, WORD wKey, INT x, IN
   if (!notify(infoPtr, NM_RELEASEDCAPTURE)) return 0;
 
   if (!infoPtr->bFocus)
-  {
     bReceivedFocus = TRUE;
-    SetFocus(infoPtr->hwndSelf);
-  }
 
   /* set left button down flag and record the click position */
   infoPtr->bLButtonDown = TRUE;
@@ -8721,6 +8718,9 @@ static LRESULT LISTVIEW_LButtonUp(LISTVIEW_INFO *infoPtr, WORD wKey, INT x, INT
             LISTVIEW_DelayedEditItem);
     }
 
+    if (!infoPtr->bFocus)
+        SetFocus(infoPtr->hwndSelf);
+
     return 0;
 }
 




More information about the wine-cvs mailing list