Chromium Code Reviews
DescriptionMake double-clicking on the tab strip minimize (i.e., "miniaturize") the
window on Mac. This entails three things:
- getting rid of the hitTest()-hack in TabStripView (which fixed bug
12505);
- capturing mouse-up events (and looking for double-clicks); and
- making TabStripView accept first mouse (to fix bug 12505 again).
A kludge is needed to prevent double-clicks on, e.g., the zoom button
from causing a minimize. (The hard-coded timestamp-based kludge was
chosen as the least of all evils, though perhaps there's a better way to
do this. A button-hit-test kludge was considered, but this is hard,
since hitting the zoom button the first time may cause the window to
move!)
Patch set 2: Properly "flashes" minimize button (by using
-performMiniaturize instead of -miniaturize). Also checks user
preferences as to whether double-clicks on title bars should minimize.
Updated variable/member names to comply with style guide for Obj-C/Cocoa
code.
Patch set 3: Use the undocumented method +[NSWindow
_shouldMiniaturizeOnDoubleClick] (but run-time check and DCHECK() its
existence), instead of an undocumented user pref key.
BUG=12286
TEST=none
Patch Set 1 #Patch Set 2 : '' #Patch Set 3 : '' #
Total comments: 6
Patch Set 4 : '' #Messages
Total messages: 9 (0 generated)
|