STR #1047 (Mac only): This is an additional fix to the event conversion
that I did to the Mac version a while ago. It makes the menus work as expected again. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4588 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
8209fcc6a3
commit
592e215dd6
@ -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 );
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user