aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pugl/pugl/pugl_osx.m22
-rw-r--r--pugl/pugl/pugl_win.cpp1
2 files changed, 21 insertions, 2 deletions
diff --git a/pugl/pugl/pugl_osx.m b/pugl/pugl/pugl_osx.m
index e8ecc98..d2681cb 100644
--- a/pugl/pugl/pugl_osx.m
+++ b/pugl/pugl/pugl_osx.m
@@ -131,6 +131,9 @@ struct PuglInternalsImpl {
- (void) rightMouseDragged:(NSEvent*)event;
- (void) rightMouseDown:(NSEvent*)event;
- (void) rightMouseUp:(NSEvent*)event;
+- (void) otherMouseDragged:(NSEvent*)event;
+- (void) otherMouseDown:(NSEvent*)event;
+- (void) otherMouseUp:(NSEvent*)event;
- (void) scrollWheel:(NSEvent*)event;
- (void) keyDown:(NSEvent*)event;
- (void) keyUp:(NSEvent*)event;
@@ -303,6 +306,11 @@ getModifiers(PuglView* view, NSEvent* ev)
[self mouseMoved: event];
}
+- (void) otherMouseDragged:(NSEvent*)event
+{
+ [self mouseMoved: event];
+}
+
- (void) mouseDown:(NSEvent*)event
{
const NSPoint wloc = [self eventLocation:event];
@@ -317,7 +325,7 @@ getModifiers(PuglView* view, NSEvent* ev)
rloc.x,
[[NSScreen mainScreen] frame].size.height - rloc.y,
getModifiers(puglview, event),
- [event buttonNumber]
+ [event buttonNumber] + 1
};
puglDispatchEvent(puglview, (PuglEvent*)&ev);
}
@@ -336,7 +344,7 @@ getModifiers(PuglView* view, NSEvent* ev)
rloc.x,
[[NSScreen mainScreen] frame].size.height - rloc.y,
getModifiers(puglview, event),
- [event buttonNumber]
+ [event buttonNumber] + 1
};
puglDispatchEvent(puglview, (PuglEvent*)&ev);
[self updateTrackingAreas];
@@ -352,6 +360,16 @@ getModifiers(PuglView* view, NSEvent* ev)
[self mouseUp: event];
}
+- (void) otherMouseDown:(NSEvent*)event
+{
+ [self mouseDown: event];
+}
+
+- (void) otherMouseUp:(NSEvent*)event
+{
+ [self mouseUp: event];
+}
+
- (void) scrollWheel:(NSEvent*)event
{
[self updateTrackingAreas];
diff --git a/pugl/pugl/pugl_win.cpp b/pugl/pugl/pugl_win.cpp
index 874abba..83d4474 100644
--- a/pugl/pugl/pugl_win.cpp
+++ b/pugl/pugl/pugl_win.cpp
@@ -598,6 +598,7 @@ puglProcessEvents(PuglView* view)
if (view->redisplay) {
InvalidateRect(view->impl->hwnd, NULL, FALSE);
+ view->redisplay = false;
}
return PUGL_SUCCESS;