Mikołaj Zalewski : comctl32: listview: Don' t edit labels on click if the view was not focused.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Sep 14 10:09:58 CDT 2006
Module: wine
Branch: master
Commit: 88b0e04de75e66a9aa923452bb5b2553dbb5752c
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=88b0e04de75e66a9aa923452bb5b2553dbb5752c
Author: Mikołaj Zalewski <mikolaj at zalewski.pl>
Date: Wed Sep 13 13:06:52 2006 +0200
comctl32: listview: Don't edit labels on click if the view was not focused.
---
dlls/comctl32/listview.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index 239a4cd..df306a8 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -8253,6 +8253,7 @@ static LRESULT LISTVIEW_LButtonDown(LIST
{
LVHITTESTINFO lvHitTestInfo;
static BOOL bGroupSelect = TRUE;
+ BOOL bReceivedFocus = FALSE;
POINT pt = { x, y };
INT nItem;
@@ -8261,7 +8262,11 @@ static LRESULT LISTVIEW_LButtonDown(LIST
/* send NM_RELEASEDCAPTURE notification */
if (!notify(infoPtr, NM_RELEASEDCAPTURE)) return 0;
- if (!infoPtr->bFocus) SetFocus(infoPtr->hwndSelf);
+ if (!infoPtr->bFocus)
+ {
+ bReceivedFocus = TRUE;
+ SetFocus(infoPtr->hwndSelf);
+ }
/* set left button down flag and record the click position */
infoPtr->bLButtonDown = TRUE;
@@ -8348,6 +8353,9 @@ static LRESULT LISTVIEW_LButtonDown(LIST
LISTVIEW_DeselectAll(infoPtr);
ReleaseCapture();
}
+
+ if (bReceivedFocus)
+ infoPtr->nEditLabelItem = -1;
return 0;
}
More information about the wine-cvs
mailing list