Files
MacPass/MacPass/MPOutlineView.m
2016-02-29 15:45:40 +01:00

40 lines
845 B
Objective-C

//
// MPOutlineView.m
// MacPass
//
// Created by Michael Starke on 23.07.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
#import "MPOutlineView.h"
#import "MPNotifications.h"
@interface MPOutlineView () {
BOOL _didBecomeFirstResponder;
}
@end
@implementation MPOutlineView
- (void)mouseDown:(NSEvent *)theEvent {
[super mouseDown:theEvent];
if(_didBecomeFirstResponder) {
[[NSNotificationCenter defaultCenter] postNotificationName:MPDidActivateViewNotification
object:self
userInfo:nil];
}
_didBecomeFirstResponder = NO;
}
- (BOOL)becomeFirstResponder {
_didBecomeFirstResponder = YES;
return YES;
}
- (BOOL)resignFirstResponder {
return [super resignFirstResponder];
}
@end