Commit 19454c0a authored by Adrian Robert's avatar Adrian Robert
Browse files

* nsterm.m (-otherMouseDown:, -otherMouseUp:, -otherMouseDragged): New...

* nsterm.m (-otherMouseDown:, -otherMouseUp:, -otherMouseDragged):  New EmacsView methods.  (EV_UDMODIFIERS, EV_BUTTON): Add OtherMouse constants.  Fixes bug #1048,1357,1414.
parent 762ed4ad
......@@ -263,14 +263,18 @@ the Function modifer (laptops). May be any of the modifier lisp symbols. */
#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
......@@ -4729,16 +4733,23 @@ - (void)mouseDown: (NSEvent *)theEvent
}
- (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];
}
......@@ -4750,6 +4761,13 @@ - (void)rightMouseUp: (NSEvent *)theEvent
}
- (void)otherMouseUp: (NSEvent *)theEvent
{
NSTRACE (otherMouseUp);
[self mouseDown: theEvent];
}
- (void) scrollWheel: (NSEvent *)theEvent
{
NSTRACE (scrollWheel);
......@@ -4818,6 +4836,13 @@ - (void)rightMouseDragged: (NSEvent *)e
}
- (void)otherMouseDragged: (NSEvent *)e
{
NSTRACE (otherMouseDragged);
[self mouseMoved: e];
}
- (BOOL)windowShouldClose: (id)sender
{
NSEvent *e =[[self window] currentEvent];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment