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

Unified Diff: components/exo/pointer.cc

Issue 2127263002: Keep the SystemModalContainerEventHandler added (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ignore touch/pointer events on Arc windows if modal open Created 4 years, 5 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
Index: components/exo/pointer.cc
diff --git a/components/exo/pointer.cc b/components/exo/pointer.cc
index 5640ae93c59f81a7630688fa04c4b1cd93872a17..1e0fa05370942e38510926a7f2fafbbde59b1144 100644
--- a/components/exo/pointer.cc
+++ b/components/exo/pointer.cc
@@ -125,6 +125,12 @@ void Pointer::SetCursor(Surface* surface, const gfx::Point& hotspot) {
void Pointer::OnMouseEvent(ui::MouseEvent* event) {
Surface* target = GetEffectiveTargetForEvent(event);
oshima 2016/07/13 21:34:00 can you move this after the following check? same
hariank 2016/07/13 23:27:22 Done.
hariank 2016/07/13 23:27:22 Done.
+ if (!ash::Shell::GetInstance()->CanWindowReceiveEvents(
reveman 2016/07/13 18:55:09 Can you add a short comment above this to explain
hariank 2016/07/13 23:27:22 Done.
+ static_cast<aura::Window*>(event->target()))) {
+ event->StopPropagation();
reveman 2016/07/13 18:55:09 Is it really correct to call StopPropagation here?
oshima 2016/07/13 21:34:00 Shell::CanWindowReceiveEvents is used to block eve
hariank 2016/07/13 23:27:22 Done.
reveman 2016/07/14 11:15:40 I'm still failing to see why StopPropagation shoul
oshima 2016/07/14 12:21:27 I think this is misunderstanding. The event receiv
reveman 2016/07/14 13:59:49 Right, pre target handler is for all windows. I ha
oshima 2016/07/14 14:38:27 We can skip it if you feel strongly about it, it w
+ return;
+ }
+
// If target is different than the current pointer focus then we need to
// generate enter and leave events.
if (target != focus_) {
« no previous file with comments | « ash/shell.h ('k') | components/exo/pointer_unittest.cc » ('j') | components/exo/touch.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698