Files
Mujoco_WASM/python/mujoco/mjpython
Kevin Zakka 327f05a567 Fix macOS crash on viewer close (NSScreen main-thread assertion)
Hiding the dock icon after the viewer window closes triggers an
asynchronous screen/dock reconfiguration via SkyLight. Without
draining the main run loop, the resulting NSScreen invalidation
notification is dispatched to a GCD worker thread, which hits
NSScreen's main-thread assertion and crashes the process.

Drain the main NSRunLoop briefly after setActivationPolicy: so the
reconfiguration is processed on the main thread.
2026-03-02 12:48:38 -08:00
..