aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pugl/pugl_osx.m14
1 files changed, 5 insertions, 9 deletions
diff --git a/pugl/pugl_osx.m b/pugl/pugl_osx.m
index 1870207..80938f2 100644
--- a/pugl/pugl_osx.m
+++ b/pugl/pugl_osx.m
@@ -301,11 +301,12 @@ keySymToSpecial(PuglView* view, NSEvent* ev)
const int opts = (NSTrackingMouseEnteredAndExited |
NSTrackingMouseMoved |
NSTrackingActiveAlways);
- trackingArea = [ [NSTrackingArea alloc] initWithRect:[self bounds]
- options:opts
- owner:self
- userInfo:nil];
+ trackingArea = [[NSTrackingArea alloc] initWithRect:[self bounds]
+ options:opts
+ owner:self
+ userInfo:nil];
[self addTrackingArea:trackingArea];
+ [super updateTrackingAreas];
}
- (NSPoint) eventLocation:(NSEvent*)event
@@ -315,7 +316,6 @@ keySymToSpecial(PuglView* view, NSEvent* ev)
- (void)mouseEntered:(NSEvent*)theEvent
{
- [self updateTrackingAreas];
}
- (void)mouseExited:(NSEvent*)theEvent
@@ -393,7 +393,6 @@ keySymToSpecial(PuglView* view, NSEvent* ev)
(uint32_t)[event buttonNumber] + 1
};
puglDispatchEvent(puglview, (const PuglEvent*)&ev);
- [self updateTrackingAreas];
}
- (void) rightMouseDown:(NSEvent*)event
@@ -418,8 +417,6 @@ keySymToSpecial(PuglView* view, NSEvent* ev)
- (void) scrollWheel:(NSEvent*)event
{
- [self updateTrackingAreas];
-
const NSPoint wloc = [self eventLocation:event];
const NSPoint rloc = [NSEvent mouseLocation];
const PuglEventScroll ev = {
@@ -436,7 +433,6 @@ keySymToSpecial(PuglView* view, NSEvent* ev)
[event deltaY]
};
puglDispatchEvent(puglview, (const PuglEvent*)&ev);
- [self updateTrackingAreas];
}
- (void) keyDown:(NSEvent*)event