[PATCH 2/2] comctl32: For multiselect monthcal control send MCN_SELCHANGE notification on WM_LBUTTONDOWN event.
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> --- 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); -- 2.20.1
participants (1)
-
Dmitry Timoshkov