Restore compilability with old SDKs after commit of support for zoom gesture.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10660 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Manolo Gouy 2015-04-03 05:31:01 +00:00
parent d5a8755ead
commit 38a0ebd38f
1 changed files with 3 additions and 1 deletions

View File

@ -956,6 +956,7 @@ static void cocoaMouseWheelHandler(NSEvent *theEvent)
*/
static void cocoaMagnifyHandler(NSEvent *theEvent)
{
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
fl_lock_function();
Fl_Window *window = (Fl_Window*)[(FLWindow*)[theEvent window] getFl_Window];
if ( !window->shown() ) {
@ -963,7 +964,7 @@ static void cocoaMagnifyHandler(NSEvent *theEvent)
return;
}
Fl::first_window(window);
Fl::e_dy = [theEvent magnification]*1000;
Fl::e_dy = [theEvent magnification]*1000; // 10.5.2
if ( Fl::e_dy) {
NSPoint pos = [theEvent locationInWindow];
pos.y = window->h() - pos.y;
@ -973,6 +974,7 @@ static void cocoaMagnifyHandler(NSEvent *theEvent)
Fl::handle( FL_ZOOM_GESTURE, window );
}
fl_unlock_function();
#endif
}
/*