For a cross-platform project with much legacy code, my Cocoa app uses only one NSWindow with a custom NSView that captures all the mouse events and draws all my app graphic details.
I need to implement a local modal behavior and so I use inside the main thread:
CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.01, false);
inside a locale loop. The function returns after 0.01 sec as expected with a value of kCFRunLoopRunTimedOut. However, the mouse events are during that time no more received by the custom NSView and so my app looks like it is frozen (with the color mouse cursor going round and round).
Timer events still arrive to the custom NSView, but not mouse events.
Apple specifies that this function can be called recursively. Is there anything else I should do so that the NSView still receives the user mouse inputs ?