diff --git a/src/_macosx.m b/src/_macosx.m index 8038b72899df..299fed1785a8 100755 --- a/src/_macosx.m +++ b/src/_macosx.m @@ -461,6 +461,8 @@ int mpl_check_modifier( return NULL; } + Py_BEGIN_ALLOW_THREADS + NSDate* date = (timeout > 0.0) ? [NSDate dateWithTimeIntervalSinceNow: timeout] : [NSDate distantFuture]; @@ -473,6 +475,8 @@ int mpl_check_modifier( [NSApp sendEvent: event]; } + Py_END_ALLOW_THREADS + Py_RETURN_NONE; }