Owen Rudge : comctl32: Capture the mouse when performing a listview marquee selection.
Alexandre Julliard
julliard at winehq.org
Mon Oct 5 09:54:22 CDT 2009
Module: wine
Branch: master
Commit: b63c1cb219bf1fd3a62c39799a0f248eaa4a979f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b63c1cb219bf1fd3a62c39799a0f248eaa4a979f
Author: Owen Rudge <orudge at codeweavers.com>
Date: Fri Oct 2 16:13:26 2009 +0100
comctl32: Capture the mouse when performing a listview marquee selection.
---
dlls/comctl32/listview.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index eb2dbfb..e1e51e7 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -3731,7 +3731,10 @@ static LRESULT LISTVIEW_MouseMove(LISTVIEW_INFO *infoPtr, WORD fwKeys, INT x, IN
/* If we're allowing multiple selections, send notification.
If return value is non-zero, cancel. */
if (!(infoPtr->dwStyle & LVS_SINGLESEL) && (notify_hdr(infoPtr, LVN_MARQUEEBEGIN, &hdr) == 0))
+ {
infoPtr->bMarqueeSelect = TRUE;
+ SetCapture(infoPtr->hwndSelf);
+ }
}
else
{
@@ -9533,9 +9536,12 @@ static LRESULT LISTVIEW_LButtonUp(LISTVIEW_INFO *infoPtr, WORD wKey, INT x, INT
if (infoPtr->bDragging || infoPtr->bMarqueeSelect)
{
- /* Remove the marquee rectangle */
+ /* Remove the marquee rectangle and release our mouse capture */
if (infoPtr->bMarqueeSelect)
+ {
LISTVIEW_InvalidateRect(infoPtr, &infoPtr->marqueeRect);
+ ReleaseCapture();
+ }
SetRect(&infoPtr->marqueeRect, 0, 0, 0, 0);
More information about the wine-cvs
mailing list