Owen Rudge : comctl32: Cancel marquee selection if we lose focus in listview.
Alexandre Julliard
julliard at winehq.org
Wed Nov 4 10:26:23 CST 2009
Module: wine
Branch: master
Commit: c1877a2d5052122ee7770921d028b5b7900deca1
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c1877a2d5052122ee7770921d028b5b7900deca1
Author: Owen Rudge <orudge at codeweavers.com>
Date: Mon Nov 2 10:58:00 2009 -0600
comctl32: Cancel marquee selection if we lose focus in listview.
---
dlls/comctl32/listview.c | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index 415a863..ba9bb3b 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -9453,7 +9453,19 @@ static LRESULT LISTVIEW_KillFocus(LISTVIEW_INFO *infoPtr)
/* if we have a focus rectangle, get rid of it */
LISTVIEW_ShowFocusRect(infoPtr, FALSE);
-
+
+ /* if have a marquee selection, stop it */
+ if (infoPtr->bMarqueeSelect)
+ {
+ /* Remove the marquee rectangle and release our mouse capture */
+ LISTVIEW_InvalidateRect(infoPtr, &infoPtr->marqueeRect);
+ ReleaseCapture();
+
+ SetRect(&infoPtr->marqueeRect, 0, 0, 0, 0);
+
+ infoPtr->bMarqueeSelect = FALSE;
+ }
+
/* set window focus flag */
infoPtr->bFocus = FALSE;
More information about the wine-cvs
mailing list