winemac: Fix issues found with Main Thread Checker
Fix 3 calls to AppKit that were not being done from the main thread, found using Apple's Main Thread Checker.
I used it with Wine by dlopen()ing /Applications/Xcode.app/Contents/Developer/usr/lib/libMainThreadChecker.dylib
in macdrv_init()
, commenting out the SIGABRT
handler in signal_x86_64.c
, and setting MTC_CRASH_ON_REPORT=1
so the process will abort()
and eventually generate a crash log+backtrace.