From 3c5845d36c5c67ae20f39ad021900e482f4dd53a Mon Sep 17 00:00:00 2001 From: Joachim Henze Date: Fri, 18 Dec 2020 01:42:55 +0100 Subject: [PATCH] [0.4.10][COMCTL32] Updown Suppress the NM_RELEASEDCAPTURE notification CORE-14365 This fixes a strange toggle-back-effect in 'Zeckensacks Glide Wrapper 0.84c' by importing Wine commit https://source.winehq.org/git/wine.git/commit/9dbe886e3ffd1c38a89f9cf256b7d172e408ec58 Thanks to patches author Akihiro Sagawa Fix picked from 0.4.13-dev-1169-g 841732e45c5abfc2572b88b392c09decdc119bf7 This was no regression, but I could not resist porting it back, because it's just too tempting to fix a bug by deleting code. Win-win! --- dll/win32/comctl32/updown.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/dll/win32/comctl32/updown.c b/dll/win32/comctl32/updown.c index 8dec7a4807a..6b328ff90f9 100644 --- a/dll/win32/comctl32/updown.c +++ b/dll/win32/comctl32/updown.c @@ -781,14 +781,8 @@ static BOOL UPDOWN_CancelMode (UPDOWN_INFO *infoPtr) KillTimer (infoPtr->Self, TIMER_ACCEL); KillTimer (infoPtr->Self, TIMER_AUTOPRESS); - if (GetCapture() == infoPtr->Self) { - NMHDR hdr; - hdr.hwndFrom = infoPtr->Self; - hdr.idFrom = GetWindowLongPtrW (infoPtr->Self, GWLP_ID); - hdr.code = NM_RELEASEDCAPTURE; - SendMessageW(infoPtr->Notify, WM_NOTIFY, hdr.idFrom, (LPARAM)&hdr); - ReleaseCapture(); - } + if (GetCapture() == infoPtr->Self) + ReleaseCapture(); infoPtr->Flags &= ~FLAG_PRESSED; InvalidateRect (infoPtr->Self, NULL, FALSE);