Is it possible to handle click event on menu bar in OS X?
I mean white space, not menu item.
I tried this - Detect click on OS X menu bar? - addLocalMonitorForEventsMatchingMask
[NSEvent addLocalMonitorForEventsMatchingMask: (NSLeftMouseDownMask | NSRightMouseDownMask | NSOtherMouseDownMask | NSKeyDownMask) handler:^(NSEvent *incomingEvent) {
NSEvent *result = incomingEvent;
NSWindow *targetWindowForEvent = [incomingEvent window];
return result;
}];
Also I tried addGlobalMonitorForEventsMatchingMask.
Without any result. Is it possible?
Thanks.