From 7f7514867116a63a1efc0f8140cc053638e2c521 Mon Sep 17 00:00:00 2001 From: whitequark Date: Mon, 20 May 2019 22:58:07 +0000 Subject: [PATCH] Win32: ignore WM_MOUSEWHEEL events that are forwarded to other window. Before this commit, scrolling the property browser positioned on top of a face in the main window would highlight the face. --- src/platform/guiwin.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/platform/guiwin.cpp b/src/platform/guiwin.cpp index 0366880a..a39e3515 100644 --- a/src/platform/guiwin.cpp +++ b/src/platform/guiwin.cpp @@ -822,6 +822,7 @@ public: event.shiftDown = (wParam & MK_SHIFT) != 0; event.controlDown = (wParam & MK_CONTROL) != 0; + bool consumed = false; switch(msg) { case WM_LBUTTONDOWN: event.button = MouseEvent::Button::LEFT; @@ -872,6 +873,7 @@ public: sscheck(hWindowUnderMouse = WindowFromPoint(pt)); if(hWindowUnderMouse && hWindowUnderMouse != h) { SendMessageW(hWindowUnderMouse, msg, wParam, lParam); + consumed = true; break; } @@ -903,7 +905,7 @@ public: } } - if(window->onMouseEvent) { + if(!consumed && window->onMouseEvent) { window->onMouseEvent(event); } break;