I've an app that opens a menu when clicking on the dock icon (- (BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication hasVisibleWindows:(BOOL)flag
)
The menu "stops" the execution of the current thread until it's closed. Therefore, I only receive calls of applicationShouldHandleReopen:
once the menu is closed.
I thought that with a timer I could check if there is such method calls in the queue. But is it this possible ? Or is there an other way to handle my problem ? (I want to close my menu on the second click on the dock icon)