Bug 1072391 - Only minimize on double-click in draggable regions of the window. r=smichaud

This commit is contained in:
Markus Stange 2014-09-24 17:15:28 -04:00
parent 763f39168c
commit a74d353fab

View File

@ -4852,8 +4852,9 @@ NSEvent* gLastDragMouseDownEvent = nil;
// Check to see if we are double-clicking in the titlebar.
CGFloat locationInTitlebar = [[self window] frame].size.height - [theEvent locationInWindow].y;
LayoutDeviceIntPoint pos = geckoEvent.refPoint;
if (!defaultPrevented && [theEvent clickCount] == 2 &&
[[self window] isMovableByWindowBackground] &&
mGeckoChild->GetDraggableRegion().Contains(pos.x, pos.y) &&
[self shouldMinimizeOnTitlebarDoubleClick] &&
[[self window] isKindOfClass:[ToolbarWindow class]] &&
(locationInTitlebar < [(ToolbarWindow*)[self window] titlebarHeight] ||