Dmitry Timoshkov : comctl32: For multiselect monthcal control send MCN_SELCHANGE notification on WM_LBUTTONDOWN event.

Alexandre Julliard julliard at winehq.org
Fri Feb 7 15:41:07 CST 2020


Module: wine
Branch: master
Commit: 364f0c3b6c987669543eb59f9489aeb1cf747072
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=364f0c3b6c987669543eb59f9489aeb1cf747072

Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date:   Fri Jan 24 15:25:14 2020 +0800

comctl32: For multiselect monthcal control send MCN_SELCHANGE notification on WM_LBUTTONDOWN event.

Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/comctl32/monthcal.c       | 3 ++-
 dlls/comctl32/tests/monthcal.c | 1 -
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/comctl32/monthcal.c b/dlls/comctl32/monthcal.c
index 244bfcee69..1de13dab36 100644
--- a/dlls/comctl32/monthcal.c
+++ b/dlls/comctl32/monthcal.c
@@ -2258,7 +2258,8 @@ MONTHCAL_LButtonDown(MONTHCAL_INFO *infoPtr, LPARAM lParam)
     MONTHCAL_SetSelRange(infoPtr, st);
 
     infoPtr->status = MC_SEL_LBUTDOWN;
-    MONTHCAL_SetDayFocus(infoPtr, &ht.st);
+    if (MONTHCAL_SetDayFocus(infoPtr, &ht.st) && (infoPtr->dwStyle & MCS_MULTISELECT))
+        MONTHCAL_NotifySelectionChange(infoPtr);
     return 0;
   }
   }
diff --git a/dlls/comctl32/tests/monthcal.c b/dlls/comctl32/tests/monthcal.c
index 974787ac36..ae528a0ddb 100644
--- a/dlls/comctl32/tests/monthcal.c
+++ b/dlls/comctl32/tests/monthcal.c
@@ -2042,7 +2042,6 @@ static void test_sel_notify(void)
         got_MCN_SELECT = got_MCN_SELCHANGE = FALSE;
         SendMessageA(hwnd, WM_LBUTTONDOWN, 0, MAKELPARAM(mchit.pt.x, mchit.pt.y));
         if (styles[i].val & MCS_MULTISELECT)
-todo_wine
             ok(got_MCN_SELCHANGE, "%d: MCN_SELCHANGE should be sent\n", i);
         else
             ok(!got_MCN_SELCHANGE, "%d: MCN_SELCHANGE should not be sent\n", i);




More information about the wine-cvs mailing list