Mercurial > dwindows
comparison mac/dw.m @ 1593:19af25f71e1f
Yet another fix attempt for mene item issues on Mac 10.5.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sat, 18 Feb 2012 20:45:51 +0000 |
parents | 9eef6f82ee50 |
children | d7fcea7bfcf9 |
comparison
equal
deleted
inserted
replaced
1592:1795bd78207d | 1593:19af25f71e1f |
---|---|
933 } | 933 } |
934 _event_handler([self window], nil, 13); | 934 _event_handler([self window], nil, 13); |
935 } | 935 } |
936 -(void)setMenu:(NSMenu *)input { windowmenu = input; [windowmenu retain]; } | 936 -(void)setMenu:(NSMenu *)input { windowmenu = input; [windowmenu retain]; } |
937 -(void)menuHandler:(id)sender | 937 -(void)menuHandler:(id)sender |
938 { | 938 { |
939 [DWObj performSelector:@selector(menuHandler:) withObject:sender afterDelay:0]; | 939 id menu = [sender menu]; |
940 | |
941 /* Find the highest menu for this item */ | |
942 while([menu supermenu]) | |
943 { | |
944 menu = [menu supermenu]; | |
945 } | |
946 | |
947 /* Only perform the delay if this item is a child of the main menu */ | |
948 if([DWApp mainMenu] == menu) | |
949 [DWObj performSelector:@selector(menuHandler:) withObject:sender afterDelay:0]; | |
950 else | |
951 [DWObj menuHandler:sender]; | |
940 _dw_wakeup_app(); | 952 _dw_wakeup_app(); |
941 } | 953 } |
942 -(void)mouseDragged:(NSEvent *)theEvent { _event_handler(self, theEvent, 5); } | 954 -(void)mouseDragged:(NSEvent *)theEvent { _event_handler(self, theEvent, 5); } |
943 -(void)mouseMoved:(NSEvent *)theEvent | 955 -(void)mouseMoved:(NSEvent *)theEvent |
944 { | 956 { |