diff options
| author | Tomáš Znamenáček | 2015-01-09 12:54:50 +0100 |
|---|---|---|
| committer | Tomáš Znamenáček | 2015-01-12 17:10:20 +0100 |
| commit | 86a32313986fb9da606df40bc937298b2abeed35 (patch) | |
| tree | 4882301f40e68403e540eb128b8469222c1f790b /Framework | |
| parent | 0a0619461d473085608af0aa1e00540bf6253a9c (diff) | |
| download | MASShortcut-86a32313986fb9da606df40bc937298b2abeed35.tar.bz2 | |
Added support for older OS X releases back to 10.6 included.
Apart from turning off Auto Layout for the Demo project, the only
thing remaining was several __weak qualifiers to prevent retain
cycles in blocks. I have replaced them with __unsafe_unretained
since __weak is not supported on 10.6. There should be no safety
concerns here, since we are certain the pointers will remain valid.
Diffstat (limited to 'Framework')
| -rw-r--r-- | Framework/MASShortcutView.m | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Framework/MASShortcutView.m b/Framework/MASShortcutView.m index aace67e..74e14de 100644 --- a/Framework/MASShortcutView.m +++ b/Framework/MASShortcutView.m @@ -369,7 +369,7 @@ void *kUserDataHint = &kUserDataHint; static id eventMonitor = nil; if (shouldActivate) { - __weak MASShortcutView *weakSelf = self; + __unsafe_unretained MASShortcutView *weakSelf = self; NSEventMask eventMask = (NSKeyDownMask | NSFlagsChangedMask); eventMonitor = [NSEvent addLocalMonitorForEventsMatchingMask:eventMask handler:^(NSEvent *event) { @@ -450,7 +450,7 @@ void *kUserDataHint = &kUserDataHint; static id observer = nil; NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; if (shouldActivate) { - __weak MASShortcutView *weakSelf = self; + __unsafe_unretained MASShortcutView *weakSelf = self; observer = [notificationCenter addObserverForName:NSWindowDidResignKeyNotification object:self.window queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notification) { weakSelf.recording = NO; |
