Browse Source

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

tags/2021-05-28
jules 10 years ago
parent
commit
8aa1831d3c
1 changed files with 9 additions and 1 deletions
  1. +9
    -1
      modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm

+ 9
- 1
modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm 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)


Loading…
Cancel
Save