Closed Bug 1102823 Opened 10 years ago Closed 9 years ago

[10.10] Double clicking the title bar should zoom / maximize the window

Categories

(Core :: Widget: Cocoa, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla36

People

(Reporter: super_egi, Assigned: mstange)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:34.0) Gecko/20100101 Firefox/34.0
Build ID: 20141113192814

Steps to reproduce:

Double clicking the title bar above the tabs


Actual results:

Nothing


Expected results:

window should maximize (not full screen), the same thing that happens if I alt+click the green (+) button.

Note that it works if I set browser.tabs.drawInTitlebar to false, because Firefox then uses the system title bar.
Markus, is this something we can fix in widget land or are we going to have to fake this in chrome land?
Component: General → Untriaged
Flags: needinfo?(mstange)
Widget.
Assignee: nobody → mstange
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Flags: needinfo?(mstange)
Component: Untriaged → Widget: Cocoa
Product: Firefox → Core
Version: 34 Branch → Trunk
Attached patch patchSplinter Review
I've tested this on 10.10. It was surprising to me that -[NSWindow _shouldZoomOnDoubleClick] has been available since 10.7, but I assume that it just returns false on 10.9 and below.
Attachment #8526834 - Flags: review?(smichaud)
Comment on attachment 8526834 [details] [diff] [review]
patch

I'm afraid I'm going to have to put this off -- probably until early next week.

I'll want to test on all relevant major versions of OS X.
Comment on attachment 8526834 [details] [diff] [review]
patch

This looks fine to me.

> I'll want to test on all relevant major versions of OS X.

I changed my mind about this.  Though I did end up testing on Yosemite, just to make sure that -[NSWindow performZoom:] really did a "zoom", and didn't toggle fullscreen mode (as the "zoom" button now does).

> but I assume that it just returns false on 10.9 and below

This is true, but there are some interesting twists and turns.  On 10.7 and 10.8 there are two variables in the AppKit's data segment, both initialized to '0' (== false):  _NSMiniaturizeOnDoubleClick and _NSZoomOnDoubleClick.  +[NSWindow _shouldZoomOnDoubleClick] checks the value of the latter.  But since it never gets written to, it stays at its default value of '0'.  As of 10.9 _NSZoomOnDoubleClick disappears, and +[NSWindow _shouldZoomOnDoubleClick] returns false unconditionally.

As of 10.10, _NSZoomOnDoubleClick is still gone.  But now +[NSWindow _shouldZoomOnDoubleClick] returns the opposite of _NSMiniaturizeOnDoubleClick (false if it's true and true if it's false).  +[NSWindow _shouldMiniaturizeOnDoubleClick] returns the unaltered value of _NSMiniaturizeOnDoubleClick.
Attachment #8526834 - Flags: review?(smichaud) → review+
https://hg.mozilla.org/mozilla-central/rev/1c469f11c018
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in before you can comment on or make changes to this bug.