Commit 268359b7 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: work-around a weird bug which let the drop zone respond to mouseDown...

macosx: work-around a weird bug which let the drop zone respond to mouseDown events targetted at the window title

Thanks to David for the report
(cherry picked from commit bbb30ce0)
parent 380e4021
...@@ -242,9 +242,10 @@ ...@@ -242,9 +242,10 @@
[o_fullscreen_btn setImage: [NSImage imageNamed:@"window-fullscreen"]]; [o_fullscreen_btn setImage: [NSImage imageNamed:@"window-fullscreen"]];
} }
- (void)mouseUp:(NSEvent *)event - (void)mouseDown:(NSEvent *)event
{ {
if ([event clickCount] == 2) { NSPoint ml = [self convertPoint: [event locationInWindow] fromView: self];
if( ([[self window] frame].size.height - ml.y) <= 22. && [event clickCount] == 2) {
//Get settings from "System Preferences" > "Appearance" > "Double-click on windows title bar to minimize" //Get settings from "System Preferences" > "Appearance" > "Double-click on windows title bar to minimize"
NSString *const MDAppleMiniaturizeOnDoubleClickKey = @"AppleMiniaturizeOnDoubleClick"; NSString *const MDAppleMiniaturizeOnDoubleClickKey = @"AppleMiniaturizeOnDoubleClick";
NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
...@@ -253,6 +254,8 @@ ...@@ -253,6 +254,8 @@
if ([[userDefaults objectForKey:MDAppleMiniaturizeOnDoubleClickKey] boolValue]) if ([[userDefaults objectForKey:MDAppleMiniaturizeOnDoubleClickKey] boolValue])
[[self window] miniaturize:self]; [[self window] miniaturize:self];
} }
[super mouseDown: event];
} }
@end @end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment