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.
pull/420/head
whitequark 2019-05-20 22:58:07 +00:00
parent 5dbe090098
commit 7f75148671
1 changed files with 3 additions and 1 deletions

View File

@ -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;