Mikołaj Zalewski : comctl32: listview: Don' t edit labels on click if the view was not focused.
Module: wine Branch: master Commit: 88b0e04de75e66a9aa923452bb5b2553dbb5752c URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=88b0e04de75e66a9aa923452... Author: Mikołaj Zalewski <mikolaj(a)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; }
participants (1)
-
Alexandre Julliard