#define EV_UDMODIFIERS(e) \
((([e type] == NSLeftMouseDown) ? down_modifier : 0) \
| (([e type] == NSRightMouseDown) ? down_modifier : 0) \
+ | (([e type] == NSOtherMouseDown) ? down_modifier : 0) \
| (([e type] == NSLeftMouseDragged) ? down_modifier : 0) \
| (([e type] == NSRightMouseDragged) ? down_modifier : 0) \
+ | (([e type] == NSOtherMouseDragged) ? down_modifier : 0) \
| (([e type] == NSLeftMouseUp) ? up_modifier : 0) \
- | (([e type] == NSRightMouseUp) ? up_modifier : 0))
+ | (([e type] == NSRightMouseUp) ? up_modifier : 0) \
+ | (([e type] == NSOtherMouseUp) ? up_modifier : 0))
#define EV_BUTTON(e) \
((([e type] == NSLeftMouseDown) || ([e type] == NSLeftMouseUp)) ? 0 : \
- (([e type] == NSRightMouseDown) || ([e type] == NSRightMouseUp)) ? 2 : 1)
+ (([e type] == NSRightMouseDown) || ([e type] == NSRightMouseUp)) ? 2 : \
+ [e buttonNumber] - 1)
/* Convert the time field to a timestamp in milliseconds. */
#ifdef NS_IMPL_GNUSTEP
}
-- (void)mouseUp: (NSEvent *)theEvent
+- (void)rightMouseDown: (NSEvent *)theEvent
{
- NSTRACE (mouseUp);
+ NSTRACE (rightMouseDown);
[self mouseDown: theEvent];
}
-- (void)rightMouseDown: (NSEvent *)theEvent
+- (void)otherMouseDown: (NSEvent *)theEvent
{
- NSTRACE (rightMouseDown);
+ NSTRACE (otherMouseDown);
+ [self mouseDown: theEvent];
+}
+
+
+- (void)mouseUp: (NSEvent *)theEvent
+{
+ NSTRACE (mouseUp);
[self mouseDown: theEvent];
}
}
+- (void)otherMouseUp: (NSEvent *)theEvent
+{
+ NSTRACE (otherMouseUp);
+ [self mouseDown: theEvent];
+}
+
+
- (void) scrollWheel: (NSEvent *)theEvent
{
NSTRACE (scrollWheel);
}
+- (void)otherMouseDragged: (NSEvent *)e
+{
+ NSTRACE (otherMouseDragged);
+ [self mouseMoved: e];
+}
+
+
- (BOOL)windowShouldClose: (id)sender
{
NSEvent *e =[[self window] currentEvent];