Commit bbb30ce0 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
parent 3ed66bc1
......@@ -242,9 +242,10 @@
[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"
NSString *const MDAppleMiniaturizeOnDoubleClickKey = @"AppleMiniaturizeOnDoubleClick";
NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
......@@ -253,6 +254,8 @@
if ([[userDefaults objectForKey:MDAppleMiniaturizeOnDoubleClickKey] boolValue])
[[self window] miniaturize:self];
}
[super mouseDown: event];
}
@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