comparison mac/dw.m @ 1522:c98b2ce2d5b2

Fix menuHandler not being called until an event on Mac 10.5. This reinstitutes the menu display bug on Leopard but that is only a cosmetic issues.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Fri, 30 Dec 2011 21:30:24 +0000
parents 6506f29dfefc
children 026c0b4d6ee9
comparison
equal deleted inserted replaced
1521:9834570c8761 1522:c98b2ce2d5b2
911 [DWApp setMainMenu:DWMainMenu]; 911 [DWApp setMainMenu:DWMainMenu];
912 } 912 }
913 _event_handler([self window], nil, 13); 913 _event_handler([self window], nil, 13);
914 } 914 }
915 -(void)setMenu:(NSMenu *)input { windowmenu = input; [windowmenu retain]; } 915 -(void)setMenu:(NSMenu *)input { windowmenu = input; [windowmenu retain]; }
916 -(void)menuHandler:(id)sender { [DWObj performSelector:@selector(menuHandler:) withObject:sender afterDelay:0]; } 916 -(void)menuHandler:(id)sender
917 {
918 if(DWOSMinor > 5)
919 [DWObj performSelector:@selector(menuHandler:) withObject:sender afterDelay:0];
920 else
921 [DWObj menuHandler:sender];
922 }
917 -(void)mouseDragged:(NSEvent *)theEvent { _event_handler(self, theEvent, 5); } 923 -(void)mouseDragged:(NSEvent *)theEvent { _event_handler(self, theEvent, 5); }
918 -(void)mouseMoved:(NSEvent *)theEvent 924 -(void)mouseMoved:(NSEvent *)theEvent
919 { 925 {
920 id hit = [self hitTest:[theEvent locationInWindow]]; 926 id hit = [self hitTest:[theEvent locationInWindow]];
921 927