diff options
author | dnicoara@chromium.org <dnicoara@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-06 20:03:28 +0000 |
---|---|---|
committer | dnicoara@chromium.org <dnicoara@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-06 20:03:28 +0000 |
commit | ab7943ad185ae069716925520fe2b6676adae0c3 (patch) | |
tree | 41c99167c64acc162c01997511fd66932ac5665c /ash/display | |
parent | 58d1910509196b186cf332aab9db5f082c3ac7d4 (diff) | |
download | chromium_src-ab7943ad185ae069716925520fe2b6676adae0c3.zip chromium_src-ab7943ad185ae069716925520fe2b6676adae0c3.tar.gz chromium_src-ab7943ad185ae069716925520fe2b6676adae0c3.tar.bz2 |
[Ozone] Do not warp cursor for synthesized events
This behavior is similar to not having a native event on the non-Ozone path.
Synthesized events were processed after the ScreenPositionClient was removed
from the window. Trying to convert the cursor point to screen coordinates would
trigger a CHECK in ash::wm::ConvertPointToScreen since these synthesized events
would be processed as the WindowTreeHost was shutdown.
BUG=398888
NOTRY=true
Review URL: https://codereview.chromium.org/442033002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287837 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/display')
-rw-r--r-- | ash/display/mouse_cursor_event_filter_ozone.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ash/display/mouse_cursor_event_filter_ozone.cc b/ash/display/mouse_cursor_event_filter_ozone.cc index fe2fb3a..c342dba 100644 --- a/ash/display/mouse_cursor_event_filter_ozone.cc +++ b/ash/display/mouse_cursor_event_filter_ozone.cc @@ -16,6 +16,9 @@ void MouseCursorEventFilter::OnDisplayConfigurationChanged() { } bool MouseCursorEventFilter::WarpMouseCursorIfNecessary(ui::MouseEvent* event) { + if (event->flags() & ui::EF_IS_SYNTHESIZED) + return false; + gfx::Point point_in_screen(event->location()); aura::Window* target = static_cast<aura::Window*>(event->target()); wm::ConvertPointToScreen(target, &point_in_screen); |