diff options
author | dmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-11 21:26:46 +0000 |
---|---|---|
committer | dmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-11 21:26:46 +0000 |
commit | 01c675be13a4a6acf13c2e41d45aac9f66975c11 (patch) | |
tree | 07074ae5cb4823114277b94f007408b0baa148fc /chrome/browser/cocoa/chrome_browser_window.mm | |
parent | 129ec2c380f143b8adfb9ab9d1bb7749ac59c642 (diff) | |
download | chromium_src-01c675be13a4a6acf13c2e41d45aac9f66975c11.zip chromium_src-01c675be13a4a6acf13c2e41d45aac9f66975c11.tar.gz chromium_src-01c675be13a4a6acf13c2e41d45aac9f66975c11.tar.bz2 |
Update zoom/close/miniaturize button based on cursor location after the window
has been moved.
BUG=27388
TEST=Click the zoom button on a browser window. Make sure the '+' disappears.
Review URL: http://codereview.chromium.org/384054
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31712 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/chrome_browser_window.mm')
-rw-r--r-- | chrome/browser/cocoa/chrome_browser_window.mm | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/chrome_browser_window.mm b/chrome/browser/cocoa/chrome_browser_window.mm index 94a169b..f9d0722 100644 --- a/chrome/browser/cocoa/chrome_browser_window.mm +++ b/chrome/browser/cocoa/chrome_browser_window.mm @@ -222,6 +222,18 @@ namespace { owner:self userInfo:nil]); [frameView addTrackingArea:widgetTrackingArea_]; + + // Check to see if the cursor is still in trackingRect. + NSPoint point = [self mouseLocationOutsideOfEventStream]; + point = [[self contentView] convertPoint:point fromView:nil]; + BOOL newEntered = NSPointInRect (point, trackingRect); + if (newEntered != entered_) { + // Buttons have moved, so update button state. + entered_ = newEntered; + [closeButton_ setNeedsDisplay]; + [zoomButton_ setNeedsDisplay]; + [miniaturizeButton_ setNeedsDisplay]; + } } } |