Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(349)

Unified Diff: ash/wm/panels/panel_window_event_handler.cc

Issue 144193002: Only drag or maximize / restore when event has not yet been handled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Panels too, no test for these yet. Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ash/wm/toplevel_window_event_handler.cc » ('j') | ash/wm/toplevel_window_event_handler.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f056935accf756a0b15e0563da033ebdcad880c5..a3d5d8b87b2a7abe7226ab1c5d9f2e5808ac5951 100644
--- a/ash/wm/panels/panel_window_event_handler.cc
+++ b/ash/wm/panels/panel_window_event_handler.cc
@@ -23,7 +23,8 @@ PanelWindowEventHandler::~PanelWindowEventHandler() {
void PanelWindowEventHandler::OnMouseEvent(ui::MouseEvent* event) {
aura::Window* target = static_cast<aura::Window*>(event->target());
- if (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()) ==
@@ -38,7 +39,8 @@ void PanelWindowEventHandler::OnMouseEvent(ui::MouseEvent* event) {
void PanelWindowEventHandler::OnGestureEvent(ui::GestureEvent* event) {
aura::Window* target = static_cast<aura::Window*>(event->target());
- if (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) {
« no previous file with comments | « no previous file | ash/wm/toplevel_window_event_handler.cc » ('j') | ash/wm/toplevel_window_event_handler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698