1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

OSX: prevent mouse-moves when behind an inactive window.

This commit is contained in:
jules 2012-07-19 14:07:47 +01:00
parent d92d5ba108
commit 7373bfd3be

View file

@ -502,9 +502,17 @@ public:
void redirectMouseMove (NSEvent* ev)
{
currentModifiers = currentModifiers.withoutMouseButtons();
sendMouseEvent (ev);
showArrowCursorIfNeeded();
if ([NSWindow windowNumberAtPoint: [[ev window] convertBaseToScreen: [ev locationInWindow]]
belowWindowWithWindowNumber: 0] == [window windowNumber])
{
currentModifiers = currentModifiers.withoutMouseButtons();
sendMouseEvent (ev);
showArrowCursorIfNeeded();
}
else
{
[[NSCursor arrowCursor] set];
}
}
void redirectMouseEnter (NSEvent* ev)