diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2005-11-25 14:50:22 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2005-11-25 14:50:22 +0000 |
| commit | fe286dfe7b0ae6827942d40586906431c1d97287 (patch) | |
| tree | bf7ed3b5c9ac2b1f9c46b9ac670a33455310b6f5 | |
| parent | 2a4b7134970f80d41557f6be45bd76a42a01d9d4 (diff) | |
OSX fixes...
src/Fl.cxx:
- Don't compile in static functions that aren't used.
src/Fl_mac.cxx:
- Coding style...
src/Fl_Sys_Menu_Bar.cxx:
- Fix FL_META handling - FL_META incorrectly set the CTRL modifier,
and it was not possible to get all combos of modifiers. The new
coding should work properly for all combos...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4651 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | src/Fl.cxx | 6 | ||||
| -rw-r--r-- | src/Fl_Sys_Menu_Bar.cxx | 6 | ||||
| -rw-r--r-- | src/Fl_mac.cxx | 12 |
3 files changed, 11 insertions, 13 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx index b822e2d7a..502f1d7ad 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -352,6 +352,7 @@ void Fl::remove_check(Fl_Timeout_Handler cb, void *argp) { } } +#if !defined(__APPLE__) static void run_checks() { // checks are a bit messy so that add/remove and wait may be called @@ -366,6 +367,9 @@ static void run_checks() } } +static char in_idle; +#endif // !__APPLE__ + //////////////////////////////////////////////////////////////// // wait/run/check/ready: @@ -374,8 +378,6 @@ void (*Fl::idle)(); // see Fl_add_idle.cxx for the add/remove functions extern int fl_ready(); // in Fl_<platform>.cxx extern int fl_wait(double time); // in Fl_<platform>.cxx -static char in_idle; - double Fl::wait(double time_to_wait) { // delete all widgets that were listed during callbacks do_widget_deletion(); diff --git a/src/Fl_Sys_Menu_Bar.cxx b/src/Fl_Sys_Menu_Bar.cxx index 87f9cbd08..002689917 100644 --- a/src/Fl_Sys_Menu_Bar.cxx +++ b/src/Fl_Sys_Menu_Bar.cxx @@ -133,11 +133,11 @@ static void setMenuShortcut( MenuHandle mh, int miCnt, const Fl_Menu_Item *m ) if ( !isalnum( key ) ) return; - long macMod = kMenuNoModifiers; + long macMod = kMenuNoCommandModifier; + if ( m->shortcut_ & FL_META ) macMod = kMenuNoModifiers; if ( m->shortcut_ & FL_SHIFT || isupper(key) ) macMod |= kMenuShiftModifier; if ( m->shortcut_ & FL_ALT ) macMod |= kMenuOptionModifier; - if ( m->shortcut_ & FL_META ) macMod |= kMenuControlModifier; - if ( !(m->shortcut_ & FL_CTRL) ) macMod |= kMenuNoCommandModifier; + if ( m->shortcut_ & FL_CTRL ) macMod |= kMenuControlModifier; //SetMenuItemKeyGlyph( mh, miCnt, key ); SetItemCmd( mh, miCnt, toupper(key) ); diff --git a/src/Fl_mac.cxx b/src/Fl_mac.cxx index f9f809ba1..ddf23e1e0 100644 --- a/src/Fl_mac.cxx +++ b/src/Fl_mac.cxx @@ -809,7 +809,7 @@ static pascal OSStatus carbonMousewheelHandler( EventHandlerCallRef nextHandler, } fl_lock_function(); - + fl_os_event = event; Fl_Window *window = (Fl_Window*)userData; @@ -817,17 +817,13 @@ static pascal OSStatus carbonMousewheelHandler( EventHandlerCallRef nextHandler, GetEventParameter( event, kEventParamMouseWheelAxis, typeMouseWheelAxis, NULL, sizeof(EventMouseWheelAxis), NULL, &axis ); long delta; GetEventParameter( event, kEventParamMouseWheelDelta, typeLongInteger, NULL, sizeof(long), NULL, &delta ); - if ( axis == kEventMouseWheelAxisX ) - { + if ( axis == kEventMouseWheelAxisX ) { Fl::e_dx = delta; if ( Fl::e_dx) Fl::handle( FL_MOUSEWHEEL, window ); - } - else if ( axis == kEventMouseWheelAxisY ) - { + } else if ( axis == kEventMouseWheelAxisY ) { Fl::e_dy = -delta; if ( Fl::e_dy) Fl::handle( FL_MOUSEWHEEL, window ); - } - else { + } else { fl_unlock_function(); return eventNotHandledErr; |
