summaryrefslogtreecommitdiffstats
path: root/apps/ui
diff options
context:
space:
mode:
authormgiuca@chromium.org <mgiuca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-18 00:27:23 +0000
committermgiuca@chromium.org <mgiuca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-18 00:27:23 +0000
commit04906ce4b0663ebd60b55eeec76f236aa87aac4d (patch)
tree3cc01cdff1a3aa2701379376c0dfe50c2d37781c /apps/ui
parent6e2f32f150045a406fcae640a102b0a9853f4e54 (diff)
downloadchromium_src-04906ce4b0663ebd60b55eeec76f236aa87aac4d.zip
chromium_src-04906ce4b0663ebd60b55eeec76f236aa87aac4d.tar.gz
chromium_src-04906ce4b0663ebd60b55eeec76f236aa87aac4d.tar.bz2
Fixed broken minimize/maximize buttons for Chrome Apps on Linux Aura.
The hit test function was considering the area over these buttons to be part of the caption, so the click wasn't registering. BUG=318084 Review URL: https://codereview.chromium.org/60313003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@235577 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'apps/ui')
-rw-r--r--apps/ui/views/shell_window_frame_view.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/apps/ui/views/shell_window_frame_view.cc b/apps/ui/views/shell_window_frame_view.cc
index fc8e540..3efa288 100644
--- a/apps/ui/views/shell_window_frame_view.cc
+++ b/apps/ui/views/shell_window_frame_view.cc
@@ -210,8 +210,19 @@ int ShellWindowFrameView::NonClientHitTest(const gfx::Point& point) {
// Then see if the point is within any of the window controls.
if (close_button_ && close_button_->visible() &&
- close_button_->GetMirroredBounds().Contains(point))
+ close_button_->GetMirroredBounds().Contains(point)) {
return HTCLOSE;
+ }
+ if ((maximize_button_ && maximize_button_->visible() &&
+ maximize_button_->GetMirroredBounds().Contains(point)) ||
+ (restore_button_ && restore_button_->visible() &&
+ restore_button_->GetMirroredBounds().Contains(point))) {
+ return HTMAXBUTTON;
+ }
+ if (minimize_button_ && minimize_button_->visible() &&
+ minimize_button_->GetMirroredBounds().Contains(point)) {
+ return HTMINBUTTON;
+ }
// Caption is a safe default.
return HTCAPTION;