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
This commit is contained in:
parent
2a4b713497
commit
fe286dfe7b
@ -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();
|
||||
|
@ -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) );
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user