diff options
Diffstat (limited to 'intern')
-rw-r--r-- | intern/ghost/intern/GHOST_SystemCocoa.mm | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm index e7bbf3bb462..baa2bcd47b6 100644 --- a/intern/ghost/intern/GHOST_SystemCocoa.mm +++ b/intern/ghost/intern/GHOST_SystemCocoa.mm @@ -386,13 +386,11 @@ extern "C" int GHOST_HACK_getFirstFile(char buf[FIRSTFILEBUFLG]) - (id)init { self = [super init]; - if (self) { - NSNotificationCenter *center = [NSNotificationCenter defaultCenter]; - [center addObserver:self - selector:@selector(windowWillClose:) - name:NSWindowWillCloseNotification - object:nil]; - } + NSNotificationCenter *center = [NSNotificationCenter defaultCenter]; + [center addObserver:self + selector:@selector(windowWillClose:) + name:NSWindowWillCloseNotification + object:nil]; return self; } @@ -1669,10 +1667,8 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr) NSEventPhase momentumPhase = NSEventPhaseNone; NSEventPhase phase = NSEventPhaseNone; - if ([event respondsToSelector:@selector(momentumPhase)]) - momentumPhase = [event momentumPhase]; - if ([event respondsToSelector:@selector(phase)]) - phase = [event phase]; + momentumPhase = [event momentumPhase]; + phase = [event phase]; /* when pressing a key while momentum scrolling continues after * lifting fingers off the trackpad, the action can unexpectedly |