| Index: ash/wm/panels/panel_window_event_handler.cc
|
| diff --git a/ash/wm/panels/panel_window_event_handler.cc b/ash/wm/panels/panel_window_event_handler.cc
|
| index 006c5d89ef7a7d8e4e1c1f7a6cdaa3829952dc25..bc2661d9c899b0fe6fdb91b467f4256543942ceb 100644
|
| --- a/ash/wm/panels/panel_window_event_handler.cc
|
| +++ b/ash/wm/panels/panel_window_event_handler.cc
|
| @@ -22,12 +22,11 @@ PanelWindowEventHandler::~PanelWindowEventHandler() {
|
|
|
| void PanelWindowEventHandler::OnMouseEvent(ui::MouseEvent* event) {
|
| aura::Window* target = static_cast<aura::Window*>(event->target());
|
| - if (!event->handled() &&
|
| - event->type() == ui::ET_MOUSE_PRESSED &&
|
| + if (!event->handled() && event->type() == ui::ET_MOUSE_PRESSED &&
|
| event->flags() & ui::EF_IS_DOUBLE_CLICK &&
|
| event->IsOnlyLeftMouseButton() &&
|
| - target->delegate()->GetNonClientComponent(event->location()) ==
|
| - HTCAPTION) {
|
| + target->delegate()->GetNonClientComponent(
|
| + gfx::ToFlooredPoint(event->location())) == HTCAPTION) {
|
| ash::Shell::GetInstance()->metrics()->RecordUserMetricsAction(
|
| ash::UMA_PANEL_MINIMIZE_CAPTION_CLICK);
|
| wm::GetWindowState(target)->Minimize();
|
| @@ -38,11 +37,10 @@ void PanelWindowEventHandler::OnMouseEvent(ui::MouseEvent* event) {
|
|
|
| void PanelWindowEventHandler::OnGestureEvent(ui::GestureEvent* event) {
|
| aura::Window* target = static_cast<aura::Window*>(event->target());
|
| - if (!event->handled() &&
|
| - event->type() == ui::ET_GESTURE_TAP &&
|
| + if (!event->handled() && event->type() == ui::ET_GESTURE_TAP &&
|
| event->details().tap_count() == 2 &&
|
| - target->delegate()->GetNonClientComponent(event->location()) ==
|
| - HTCAPTION) {
|
| + target->delegate()->GetNonClientComponent(
|
| + gfx::ToFlooredPoint(event->location())) == HTCAPTION) {
|
| ash::Shell::GetInstance()->metrics()->RecordUserMetricsAction(
|
| ash::UMA_PANEL_MINIMIZE_CAPTION_GESTURE);
|
| wm::GetWindowState(target)->Minimize();
|
|
|