Closed kalvish21 closed 8 years ago
I figured it out. In OS X 10.11 Apple changed the setting. I will create a pull request for this.
- (void)mouseUp:(NSEvent *)theEvent
{
if ([theEvent clickCount] == 2) {
NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
// Get settings from "System Preferences" > "Appearance" > "Double-click on windows title bar to minimize"
NSString *const MDAppleMiniaturizeOnDoubleClickKey = @"AppleMiniaturizeOnDoubleClick";
BOOL shouldMiniaturize = [[userDefaults objectForKey:MDAppleMiniaturizeOnDoubleClickKey] boolValue];
// In El Capitan and later from "System Preferences" > "Dock" > "Double-click on windows title bar to ..."
NSString *const MDAppleMiniaturizeOnDoubleClickKeyElCapitan = @"AppleActionOnDoubleClick";
shouldMiniaturize = shouldMiniaturize || [[userDefaults objectForKey:MDAppleMiniaturizeOnDoubleClickKeyElCapitan] isEqualToString:@"Minimize"];
if (shouldMiniaturize) {
[[self window] performMiniaturize:self];
}
}
}
Fixed in #205
I'm not able to minimize when I double click the window. I have El Capitan and the setting is ON (in El Capitan the setting is Preferences > Dock > "Double click a window's title bar to..". I have it set to minimize. The method below when I debug returns false for the minimize:
I think the preference AppleMiniaturizeOnDoubleClick is incorrect?