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:
parent
3cab305909
commit
8aa1831d3c
1 changed files with 9 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue