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

Unified Diff: mash/wm/frame/move_event_handler.cc

Issue 1843433002: mash: Fix DCHECK when clicking on window close box (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/wm/frame/move_event_handler.cc
diff --git a/mash/wm/frame/move_event_handler.cc b/mash/wm/frame/move_event_handler.cc
index 256e0aa88d32b6a18a79fa2acdbf0621d787dcec..0d3e3ca3974243424099ad45da3ae4e49208a408 100644
--- a/mash/wm/frame/move_event_handler.cc
+++ b/mash/wm/frame/move_event_handler.cc
@@ -58,6 +58,12 @@ void MoveEventHandler::ProcessLocatedEvent(ui::LocatedEvent* event) {
const bool had_move_loop = move_loop_.get() != nullptr;
DCHECK(event->IsMouseEvent() || event->IsTouchEvent());
+ // Non-client buttons like the close box capture the mouse during clicks.
+ // Explicitly ignore those events here instead of below because there is no
+ // PointerEvent equivalent into which the event can be converted.
+ if (event->type() == ui::ET_MOUSE_CAPTURE_CHANGED)
msw 2016/03/29 15:47:40 The PointerEvent ctors will NOTREACHED on other mo
James Cook 2016/03/29 17:38:07 Yeah, good point. I talked to Sadrul and we decid
+ return;
+
// TODO(moshayedi): no need for this once MoveEventHandler directly receives
// pointer events.
scoped_ptr<ui::PointerEvent> pointer_event;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698