changeset 1133:25bea6526ca1

Similar Mac fix to what I just commited on Windows... Event handler returns -1 when event was unhandled, so send the events only if the handler did not return TRUE.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 06 Sep 2011 19:53:39 +0000
parents 6d618dcff792
children 41a93f9896e3
files mac/dw.m
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mac/dw.m	Tue Sep 06 14:47:39 2011 +0000
+++ b/mac/dw.m	Tue Sep 06 19:53:39 2011 +0000
@@ -703,12 +703,12 @@
 @implementation DWWindow
 -(void)sendEvent:(NSEvent *)theEvent
 {
-   int rcode = 0;
+   int rcode = -1;
    if([theEvent type] == NSKeyDown)
    {
       rcode = _event_handler(self, theEvent, 2);
    }
-   if ( rcode == 0 )
+   if ( rcode != TRUE )
       [super sendEvent:theEvent];
 }
 -(void)keyDown:(NSEvent *)theEvent { }