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

Fix for exceptions in OSX pressure detection when WebKit views are used.

This commit is contained in:
jules 2015-11-09 16:01:32 +00:00
parent 3cab305909
commit 8aa1831d3c

View file

@ -1090,7 +1090,15 @@ public:
static float getMousePressure (NSEvent* e) noexcept
{
return (float) e.pressure;
@try
{
if (e.type != NSMouseEntered && e.type != NSMouseExited)
return (float) e.pressure;
}
@catch (NSException* e) {}
@finally {}
return 0.0f;
}
static Point<float> getMousePos (NSEvent* e, NSView* view)