New issue
Advanced search Search tips

Issue 613646 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug
mus



Sign in to add a comment

EventDispatcher doesn't send exit/cancels in enough cases

Project Member Reported by sky@chromium.org, May 20 2016

Issue description

EventDispatcher needs to reevaluate pointer targets on changes to hierarchy, and bounds. Specifically if the stacking order of any of the pointer targets ancestors changes, or any of the ancestors are moved to a different container, or the bounds of any ancestors changes, then the targets needs to be reevaluated.
 
Cc: jonr...@chromium.org
Project Member

Comment 2 by bugdroid1@chromium.org, May 20 2016

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

commit b863e7efb7ffcb6be025385c11d61b4b70b9ceee
Author: sky <sky@chromium.org>
Date: Fri May 20 19:59:42 2016

EventDispatcher shouldn't always cancel on a hierarchy change

Currently when a window is moved to a different parent we cancel
events. This is problematic for window dragging as we want to reparent
the window to ensure it's stacked on top of other windows.

The fix here isn't ideal, but I'm going to address the bigger issue as
part of 613646.

BUG= 613646 
TEST=covered by test
R=jonross@chromium.org

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

[modify] https://crrev.com/b863e7efb7ffcb6be025385c11d61b4b70b9ceee/components/mus/ws/event_dispatcher.cc
[modify] https://crrev.com/b863e7efb7ffcb6be025385c11d61b4b70b9ceee/components/mus/ws/event_dispatcher_unittest.cc
[modify] https://crrev.com/b863e7efb7ffcb6be025385c11d61b4b70b9ceee/components/mus/ws/server_window_surface_manager_test_api.cc
[modify] https://crrev.com/b863e7efb7ffcb6be025385c11d61b4b70b9ceee/components/mus/ws/server_window_surface_manager_test_api.h
[modify] https://crrev.com/b863e7efb7ffcb6be025385c11d61b4b70b9ceee/components/mus/ws/test_utils.h

Components: MUS
Components: Internals>MUS
Labels: Proj-Mustash

Comment 5 by sky@chromium.org, Mar 7 2017

Labels: -Proj-Mustash Proj-Mustash-Mus
Project Member

Comment 6 by bugdroid1@chromium.org, Sep 5 2017

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

commit 3c65aab7d36bd856733eb0c73c03d1076b4022e0
Author: Scott Violet <sky@chromium.org>
Date: Tue Sep 05 22:39:59 2017

chromeos: make EventDispatcher not release capture on moving to new display

If the capture window is reparented to a new display capture should
still remain.

BUG= 613646 
TEST=covered by test

Change-Id: I2b5b914c97543ba0316e788e6aefc4cb5e06afa7
Reviewed-on: https://chromium-review.googlesource.com/651075
Reviewed-by: Elliot Glaysher <erg@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#499772}
[modify] https://crrev.com/3c65aab7d36bd856733eb0c73c03d1076b4022e0/services/ui/ws/event_dispatcher.cc
[modify] https://crrev.com/3c65aab7d36bd856733eb0c73c03d1076b4022e0/services/ui/ws/event_dispatcher_unittest.cc

Project Member

Comment 7 by bugdroid1@chromium.org, Nov 15 2017

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

commit efd84b3ecbc03d720f9a1dad14f20e1d474b4931
Author: Scott Violet <sky@chromium.org>
Date: Wed Nov 15 17:08:34 2017

Changes EventDispatcher to reset mouse_cursor_source_window correctly

There were cases where EventDispatcher (and WindowServer) were not
resetting mouse_cursor_source_window() correctly, leading to resetting
at the wrong time (when the window was destroyed, vs when removed).

This patch specifically makes EventDispatcher forcefully reset the
mouse_cursor_source_window when the window is moved to an invalid
display. This typically means the window is about to be destroyed.

Additionally this makes WindowServer call to update the mouse cursor
source window when the hierarchy changes on the old and new
hierarchy. This is important as both displays may need to be updated.

Lastly, this removes a DCHECK in WindowManagerState that the
mouse_cursor_source_window is non-null. There are reasons it may be
null during dispatch (for example, the target window was destroyed
with the mouse down).

BUG= 783492 , 613646 
TEST=covered by tests

Change-Id: Ifb03d5f334bc61256d796f18a8c197abb4baca11
Reviewed-on: https://chromium-review.googlesource.com/769157
Reviewed-by: Ria Jiang <riajiang@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#516726}
[modify] https://crrev.com/efd84b3ecbc03d720f9a1dad14f20e1d474b4931/services/ui/ws/event_dispatcher.cc
[modify] https://crrev.com/efd84b3ecbc03d720f9a1dad14f20e1d474b4931/services/ui/ws/event_dispatcher.h
[modify] https://crrev.com/efd84b3ecbc03d720f9a1dad14f20e1d474b4931/services/ui/ws/event_dispatcher_delegate.h
[modify] https://crrev.com/efd84b3ecbc03d720f9a1dad14f20e1d474b4931/services/ui/ws/event_dispatcher_unittest.cc
[modify] https://crrev.com/efd84b3ecbc03d720f9a1dad14f20e1d474b4931/services/ui/ws/server_window_drawn_tracker.cc
[modify] https://crrev.com/efd84b3ecbc03d720f9a1dad14f20e1d474b4931/services/ui/ws/server_window_drawn_tracker_observer.h
[modify] https://crrev.com/efd84b3ecbc03d720f9a1dad14f20e1d474b4931/services/ui/ws/server_window_drawn_tracker_unittest.cc
[modify] https://crrev.com/efd84b3ecbc03d720f9a1dad14f20e1d474b4931/services/ui/ws/test_server_window_delegate.cc
[modify] https://crrev.com/efd84b3ecbc03d720f9a1dad14f20e1d474b4931/services/ui/ws/test_server_window_delegate.h
[modify] https://crrev.com/efd84b3ecbc03d720f9a1dad14f20e1d474b4931/services/ui/ws/test_utils.cc
[modify] https://crrev.com/efd84b3ecbc03d720f9a1dad14f20e1d474b4931/services/ui/ws/test_utils.h
[modify] https://crrev.com/efd84b3ecbc03d720f9a1dad14f20e1d474b4931/services/ui/ws/window_manager_state.cc
[modify] https://crrev.com/efd84b3ecbc03d720f9a1dad14f20e1d474b4931/services/ui/ws/window_manager_state.h
[modify] https://crrev.com/efd84b3ecbc03d720f9a1dad14f20e1d474b4931/services/ui/ws/window_server.cc
[modify] https://crrev.com/efd84b3ecbc03d720f9a1dad14f20e1d474b4931/services/ui/ws/window_server.h
[modify] https://crrev.com/efd84b3ecbc03d720f9a1dad14f20e1d474b4931/services/ui/ws/window_tree_unittest.cc

Comment 8 by sky@chromium.org, Nov 15 2017

Status: Fixed (was: Assigned)

Comment 9 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Comment 10 by dchan@chromium.org, Jan 23 2018

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

Sign in to add a comment