From 7e9ceb3c9cc8394aab28549fb16bb9cda2f6304d Mon Sep 17 00:00:00 2001 From: narzoul Date: Thu, 31 Dec 2020 18:12:30 +0100 Subject: [PATCH] Fixed highlighting stuck on scroll bar shaft after releasing mouse button --- DDrawCompat/Gdi/PaintHandlers.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/DDrawCompat/Gdi/PaintHandlers.cpp b/DDrawCompat/Gdi/PaintHandlers.cpp index c9e5034..44cd9e3 100644 --- a/DDrawCompat/Gdi/PaintHandlers.cpp +++ b/DDrawCompat/Gdi/PaintHandlers.cpp @@ -182,6 +182,17 @@ namespace // Disable VirtualizeDesktopPainting shim return 0; } + return origDefWindowProc(hwnd, msg, wParam, lParam); + } + + case WM_NCLBUTTONDOWN: + { + LRESULT result = origDefWindowProc(hwnd, msg, wParam, lParam); + if (wParam == HTHSCROLL || wParam == HTVSCROLL) + { + onNcPaint(hwnd, origDefWindowProc); + } + return result; } }