# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1333768311 0 # Node ID 7a9b1189934a79e0ff7896a498c39d31336320fb # Parent b2c26ed9031c8491a9bfeb3eac5f28f75d57034c Another fix for Contol clicking on Mac... getting double events since it is getting both menuForEvent and mouseDown messages. diff -r b2c26ed9031c -r 7a9b1189934a mac/dw.m --- a/mac/dw.m Sat Apr 07 02:16:36 2012 +0000 +++ b/mac/dw.m Sat Apr 07 03:11:51 2012 +0000 @@ -849,7 +849,11 @@ -(NSFont *)font { return font; } -(void)setSize:(NSSize)input { size = input; } -(NSSize)size { return size; } --(void)mouseDown:(NSEvent *)theEvent { _event_handler(self, theEvent, 3); } +-(void)mouseDown:(NSEvent *)theEvent +{ + if(![theEvent modifierFlags] & NSControlKeyMask) + _event_handler(self, theEvent, 3); +} -(void)mouseUp:(NSEvent *)theEvent { _event_handler(self, theEvent, 4); } -(NSMenu *)menuForEvent:(NSEvent *)theEvent { _event_handler(self, theEvent, 3); return nil; } -(void)rightMouseUp:(NSEvent *)theEvent { _event_handler(self, theEvent, 4); }