New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 631126 link

Starred by 2 users

Issue metadata

Status: Archived
Owner:
Closed: Aug 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

mash: PointerWatchers in ash do not receive mouse down events

Project Member Reported by jamescook@chromium.org, Jul 25 2016

Issue description

1. Run chrome --mash
2. Open system tray bubble
3. Click outside it

Bubble does not close.

The problem seems to be that the POINTER_DOWN event received from the window server needs to be converted to a MOUSE_DOWN event before it gets sent to the WindowTreeClientDelegate, similar to how OnWindowInputEvent handles events.

See  issue 617222 
 

Comment 1 by sadrul@chromium.org, Jul 26 2016

Cc: sadrul@chromium.org sky@chromium.org
I think in new code, we should use PointerEvents when possible. Since PointerWatcher here is new code, maybe we don't want to do the conversion in the client-lib?
https://codereview.chromium.org/2179083002/ is my patch. It's identical to what moshayedi is doing with OnWindowInputEvent at https://cs-staging.chromium.org/chromium/src/services/ui/public/cpp/lib/window_tree_client.cc?q=617222&sq=package:chromium&l=995&dr=C

It seems a little odd to have code in //ash that in some cases uses ET_MOUSE_* but in its PointerWatcher uses ET_POINTER_*. We'll end up with some cases where we need both a PointerWatcher and something else that processes events, like in this CL:
https://codereview.chromium.org/2176813002/diff/160001/ash/common/shelf/shelf_tooltip_manager.cc

What do you guys think?

Comment 3 by sadrul@chromium.org, Jul 26 2016

Unfortunately, there's too much existing code that uses ui::MouseEvent or ui::TouchEvent, and so we can't convert all of these to start using ui::PointerEvent at the same time. We have to do this incrementally, and during this time, I don't think we can avoid this scenario where parts of code in the same component use the old kind of events (i.e. Mouse/TouchEvent), and other parts use the new kind of events (i.e. PointerEvent). Since PointerWatcher is new code, I think we can start with using ui::PointerEvent for these.

For cases where we want to re-use some existing code that deals with Mouse/Touch event, we can create that from the PointerEvent we receive before handing off to existing code. Would that work?
Actually, now that I think about it some more, I think you're right. PointerWatchers should have a method OnPointerWatcherEvent, which should provide a PointerEvent (but only UP or DOWN, and maybe ENTER/EXIT later).

I won't land that CL.

This problem should go away with riajiang's work on PointerWatcher, if she ends up converting existing PointerWatchers in ash to a new signature.

Project Member

Comment 5 by bugdroid1@chromium.org, Aug 9 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/13661fe1ec3d5083450e45a25401b1ec93a61d85

commit 13661fe1ec3d5083450e45a25401b1ec93a61d85
Author: riajiang <riajiang@chromium.org>
Date: Tue Aug 09 17:51:57 2016

mus: Change PointerWatcher to observe all pointer events, with moves optional.

Based on https://codereview.chromium.org/2180683003/ and
discussions from https://codereview.chromium.org/2163453002/.

BUG= 628663 ,  631126 
TEST=views_mus_unittests, mus_public_unittests, mash_unittests,
     mus_ws_unittests

Review-Url: https://codereview.chromium.org/2183163002
Cr-Commit-Position: refs/heads/master@{#410734}

[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/ash/common/shelf/overflow_bubble.cc
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/ash/common/shelf/overflow_bubble.h
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/ash/common/shelf/shelf_tooltip_manager.cc
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/ash/common/shelf/shelf_tooltip_manager.h
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/ash/common/system/tray/tray_event_filter.cc
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/ash/common/system/tray/tray_event_filter.h
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/ash/mus/window_manager.cc
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/ash/mus/window_manager.h
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/ash/mus/window_manager_unittest.cc
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/ash/pointer_watcher_delegate_aura.cc
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/ash/sysui/pointer_watcher_delegate_mus.cc
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/ash/touch_hud/mus/touch_hud_application.cc
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/content/renderer/mus/compositor_mus_connection.cc
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/content/renderer/mus/compositor_mus_connection.h
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/services/navigation/view_impl.cc
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/services/navigation/view_impl.h
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/services/ui/demo/mus_demo.cc
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/services/ui/demo/mus_demo.h
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/services/ui/public/cpp/tests/test_window_tree.cc
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/services/ui/public/cpp/tests/test_window_tree.h
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/services/ui/public/cpp/tests/window_server_test_base.cc
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/services/ui/public/cpp/tests/window_server_test_base.h
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/services/ui/public/cpp/tests/window_tree_client_private.cc
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/services/ui/public/cpp/tests/window_tree_client_private.h
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/services/ui/public/cpp/tests/window_tree_client_unittest.cc
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/services/ui/public/cpp/window_tree_client.cc
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/services/ui/public/cpp/window_tree_client.h
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/services/ui/public/cpp/window_tree_client_delegate.h
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/services/ui/public/interfaces/window_tree.mojom
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/services/ui/test_wm/test_wm.cc
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/services/ui/ws/test_change_tracker.cc
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/services/ui/ws/test_change_tracker.h
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/services/ui/ws/test_utils.cc
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/services/ui/ws/test_utils.h
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/services/ui/ws/window_manager_state.cc
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/services/ui/ws/window_server.cc
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/services/ui/ws/window_server.h
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/services/ui/ws/window_tree.cc
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/services/ui/ws/window_tree.h
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/services/ui/ws/window_tree_client_unittest.cc
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/services/ui/ws/window_tree_unittest.cc
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/ui/views/mus/window_manager_connection.cc
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/ui/views/mus/window_manager_connection.h
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/ui/views/mus/window_manager_connection_unittest.cc
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/ui/views/pointer_watcher.h
[delete] https://crrev.com/96d24df70347fbb581f9b8e218f7efc4bab2c5c2/ui/views/touch_event_watcher.h
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/ui/views/views.gyp
[modify] https://crrev.com/13661fe1ec3d5083450e45a25401b1ec93a61d85/ui/views/views_exports.cc

Status: Fixed (was: Started)
Confirmed that riajiang's work fixed this bug. Thanks.

Labels: VerifyIn-54

Comment 8 by dchan@chromium.org, Oct 7 2016

Labels: VerifyIn-55

Comment 9 by dchan@google.com, Nov 19 2016

Labels: VerifyIn-56

Comment 10 by dchan@google.com, Jan 21 2017

Labels: VerifyIn-57

Comment 11 by dchan@google.com, Mar 4 2017

Labels: VerifyIn-58

Comment 12 by dchan@google.com, Apr 17 2017

Labels: VerifyIn-59

Comment 13 by dchan@google.com, May 30 2017

Labels: VerifyIn-60
Labels: VerifyIn-61

Comment 15 by dchan@chromium.org, Oct 14 2017

Status: Archived (was: Fixed)
Components: -MUS Internals>Services>WindowService

Sign in to add a comment