diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2009-04-12 20:00:45 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2009-04-12 20:00:45 +0000 |
| commit | ead9c2ce24c88523ebe9295015f993231a61b66a (patch) | |
| tree | 832c58415cf65e6017d0ebc777f8edee40e2e95e /src/Fl_mac.cxx | |
| parent | afe1b90dd012216b007112dc5c92f22a1f034bd7 (diff) | |
Avoiding crashes for recrsive common dialogs (this does not fix the issue at hand yet) (STR #1986, 2150) / Added menu shortcut alignment for OS X / Fixed bad system menu hadling in OS X (STR #2153) / Fixed File Input mouse pointer dragging (STR #2181)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6757 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_mac.cxx')
| -rw-r--r-- | src/Fl_mac.cxx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/Fl_mac.cxx b/src/Fl_mac.cxx index a7835881a..69217df1e 100644 --- a/src/Fl_mac.cxx +++ b/src/Fl_mac.cxx @@ -566,8 +566,11 @@ static pascal OSStatus carbonDispatchHandler( EventHandlerCallRef nextHandler, E switch (GetEventKind( event ) ) { case kEventCommandProcess: - GetEventParameter( event, kEventParamDirectObject, typeHICommand, NULL, sizeof(HICommand), NULL, &cmd ); - ret = HandleMenu( &cmd ); + ret = GetEventParameter( event, kEventParamDirectObject, typeHICommand, NULL, sizeof(HICommand), NULL, &cmd ); + if (ret == noErr && (cmd.attributes & kHICommandFromMenu) != 0) + ret = HandleMenu( &cmd ); + else + ret = eventNotHandledErr; break; } break; @@ -1241,7 +1244,7 @@ pascal OSStatus carbonTextHandler( Fl_Window *window = (Fl_Window*)userData; Fl::first_window(window); fl_lock_function(); - int kind = GetEventKind(event); + //int kind = GetEventKind(event); unsigned short buf[200]; ByteCount size; GetEventParameter( event, kEventParamTextInputSendText, typeUnicodeText, @@ -1259,6 +1262,9 @@ pascal OSStatus carbonTextHandler( fl_lock_function(); Fl::handle(FL_KEYUP, window); fl_unlock_function(); + // for some reason, the window does not redraw until the next mouse move or button push + // sending a 'redraw()' or 'awake()' does not solve the issue! + Fl::flush(); return noErr; } |
