diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_mac.cxx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/Fl_mac.cxx b/src/Fl_mac.cxx index f70ac5d55..197f5604a 100644 --- a/src/Fl_mac.cxx +++ b/src/Fl_mac.cxx @@ -632,7 +632,17 @@ static double do_queued_events( double time = 0.0 ) EventTimeout timeout = time; if (!ReceiveNextEvent(0, NULL, timeout, true, &event)) { got_events = 1; - SendEventToEventTarget( event, target ); + OSErr ret = SendEventToEventTarget( event, target ); + if ( ret==eventNotHandledErr + && GetEventClass(event)==kEventClassMouse + && GetEventKind(event)==kEventMouseDown ) { + WindowRef win; Point pos; + GetEventParameter(event, kEventParamMouseLocation, typeQDPoint, + NULL, sizeof(pos), NULL, &pos); + if (MacFindWindow(pos, &win)==inMenuBar) { + MenuSelect(pos); + } + } ReleaseEvent( event ); } |
