Mercurial > dwindows
changeset 1648:7a9b1189934a
Another fix for Contol clicking on Mac... getting double events
since it is getting both menuForEvent and mouseDown messages.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sat, 07 Apr 2012 03:11:51 +0000 |
parents | b2c26ed9031c |
children | 509effb15e35 |
files | mac/dw.m |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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); }