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

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: review comments 2 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 | ui/events/event.h » ('j') | 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..10ab376d4069f8406db815cb3304852128d89ccd 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());
+ // This event handler can receive mouse events like ET_MOUSE_CAPTURE_CHANGED
+ // that cannot be converted to PointerEvents. Ignore them because they aren't
+ // needed for move handling.
+ if (!ui::PointerEvent::CanConvertFrom(*event))
+ 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 | ui/events/event.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698