From d2f4577fc38175f7323c835211dc43cd1fef497d Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Mon, 8 Nov 2010 08:10:48 +0000 Subject: Fixed crash under Mac OS X 10.3 git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7809 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_cocoa.mm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index ae83357ba..51e963950 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -803,7 +803,6 @@ static void cocoaMouseHandler(NSEvent *theEvent) NSPoint pos = [theEvent locationInWindow]; pos.y = window->h() - pos.y; NSInteger btn = [theEvent buttonNumber] + 1; - int clickCount = [theEvent clickCount]; NSUInteger mods = [theEvent modifierFlags]; int sendEvent = 0; @@ -827,7 +826,7 @@ static void cocoaMouseHandler(NSEvent *theEvent) sendEvent = FL_PUSH; Fl::e_is_click = 1; px = (int)pos.x; py = (int)pos.y; - if (clickCount>1) + if ([theEvent clickCount] > 1) Fl::e_clicks++; else Fl::e_clicks = 0; -- cgit v1.2.3