mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Windowing: Update mousewheel handler on Windows to always process messages in the context of the peer receiving the event
This commit is contained in:
parent
5c138561bb
commit
051e701780
1 changed files with 2 additions and 8 deletions
|
|
@ -2895,14 +2895,8 @@ private:
|
|||
// the window with focus, despite what the MSDN docs might say.
|
||||
// This is the behaviour we want; if we're receiving a scroll event, we can assume it
|
||||
// should be processed by the current peer.
|
||||
const auto currentMousePos = getPOINTFromLParam ((LPARAM) GetMessagePos());
|
||||
auto* peer = getOwnerOfWindow (WindowFromPoint (currentMousePos));
|
||||
|
||||
if (peer == nullptr)
|
||||
return false;
|
||||
|
||||
const auto localPos = peer->globalToLocal (convertPhysicalScreenPointToLogical (D2DUtilities::toPoint (currentMousePos), hwnd).toFloat());
|
||||
peer->handleMouseWheel (getPointerType (wParam), localPos, getMouseEventTime(), wheel);
|
||||
const auto localPos = getLocalPointFromScreenLParam ((LPARAM) GetMessagePos());
|
||||
handleMouseWheel (getPointerType (wParam), localPos, getMouseEventTime(), wheel);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue