Commit ab7943ad authored by dnicoara@chromium.org's avatar dnicoara@chromium.org

[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
parent 58d19105
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment