New issue
Advanced search Search tips

Issue 719269 link

Starred by 3 users

Issue metadata

Status: WontFix
Owner:
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

WindowTreeClient should use SendEventToSink() for KeyEvents

Project Member Reported by sky@chromium.org, May 7 2017

Issue description

And WindowEventDispatcher::PreDispatchEvent() should handle calling through to IME. And we should get rid of ash's InputMethodEventHandler.
 

Comment 1 by sky@chromium.org, May 8 2017

Status: Assigned (was: Untriaged)
Status: Started (was: Assigned)
Project Member

Comment 3 by bugdroid1@chromium.org, May 18 2017

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

commit 9f9dddf904a9eae86f20d0fa3f68c1881a360d80
Author: moshayedi <moshayedi@chromium.org>
Date: Thu May 18 21:49:28 2017

Remove InputMethodEventHandler.

This change removes InputMethodEventHandler and instead sends the events
to IME in WindowEventDispatcher::PreDispatchEvent().

This is a step towards unifying key event processing path in classic ash and
mus+ash.

BUG= 719269 

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

[modify] https://crrev.com/9f9dddf904a9eae86f20d0fa3f68c1881a360d80/ash/BUILD.gn
[modify] https://crrev.com/9f9dddf904a9eae86f20d0fa3f68c1881a360d80/ash/display/window_tree_host_manager.cc
[modify] https://crrev.com/9f9dddf904a9eae86f20d0fa3f68c1881a360d80/ash/display/window_tree_host_manager.h
[modify] https://crrev.com/9f9dddf904a9eae86f20d0fa3f68c1881a360d80/ash/host/ash_window_tree_host.cc
[modify] https://crrev.com/9f9dddf904a9eae86f20d0fa3f68c1881a360d80/ash/host/ash_window_tree_host.h
[modify] https://crrev.com/9f9dddf904a9eae86f20d0fa3f68c1881a360d80/ash/host/ash_window_tree_host_platform.cc
[modify] https://crrev.com/9f9dddf904a9eae86f20d0fa3f68c1881a360d80/ash/host/ash_window_tree_host_platform.h
[modify] https://crrev.com/9f9dddf904a9eae86f20d0fa3f68c1881a360d80/ash/host/ash_window_tree_host_unified.cc
[modify] https://crrev.com/9f9dddf904a9eae86f20d0fa3f68c1881a360d80/ash/host/ash_window_tree_host_x11.cc
[modify] https://crrev.com/9f9dddf904a9eae86f20d0fa3f68c1881a360d80/ash/host/ash_window_tree_host_x11.h
[delete] https://crrev.com/1334d4270679548dba126bca749e54bb4232310a/ash/ime/input_method_event_handler.cc
[delete] https://crrev.com/1334d4270679548dba126bca749e54bb4232310a/ash/ime/input_method_event_handler.h
[modify] https://crrev.com/9f9dddf904a9eae86f20d0fa3f68c1881a360d80/ash/mus/ash_window_tree_host_mus.cc
[modify] https://crrev.com/9f9dddf904a9eae86f20d0fa3f68c1881a360d80/ash/mus/ash_window_tree_host_mus.h
[modify] https://crrev.com/9f9dddf904a9eae86f20d0fa3f68c1881a360d80/ash/shell.cc
[modify] https://crrev.com/9f9dddf904a9eae86f20d0fa3f68c1881a360d80/ash/test/ash_test_base.cc
[modify] https://crrev.com/9f9dddf904a9eae86f20d0fa3f68c1881a360d80/extensions/shell/BUILD.gn
[delete] https://crrev.com/1334d4270679548dba126bca749e54bb4232310a/extensions/shell/browser/input_method_event_handler.cc
[delete] https://crrev.com/1334d4270679548dba126bca749e54bb4232310a/extensions/shell/browser/input_method_event_handler.h
[modify] https://crrev.com/9f9dddf904a9eae86f20d0fa3f68c1881a360d80/extensions/shell/browser/shell_desktop_controller_aura.cc
[modify] https://crrev.com/9f9dddf904a9eae86f20d0fa3f68c1881a360d80/extensions/shell/browser/shell_desktop_controller_aura.h
[modify] https://crrev.com/9f9dddf904a9eae86f20d0fa3f68c1881a360d80/ui/aura/test/aura_test_utils.cc
[modify] https://crrev.com/9f9dddf904a9eae86f20d0fa3f68c1881a360d80/ui/aura/test/aura_test_utils.h
[modify] https://crrev.com/9f9dddf904a9eae86f20d0fa3f68c1881a360d80/ui/aura/window_event_dispatcher.cc
[modify] https://crrev.com/9f9dddf904a9eae86f20d0fa3f68c1881a360d80/ui/aura/window_event_dispatcher.h
[modify] https://crrev.com/9f9dddf904a9eae86f20d0fa3f68c1881a360d80/ui/aura/window_tree_host.cc
[modify] https://crrev.com/9f9dddf904a9eae86f20d0fa3f68c1881a360d80/ui/aura/window_tree_host.h
[modify] https://crrev.com/9f9dddf904a9eae86f20d0fa3f68c1881a360d80/ui/events/test/event_generator.cc
[modify] https://crrev.com/9f9dddf904a9eae86f20d0fa3f68c1881a360d80/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
[modify] https://crrev.com/9f9dddf904a9eae86f20d0fa3f68c1881a360d80/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc

Hi! After this commit I've noticed some strange behaviour in code and wanted to ask you if it is expected. 
Now every key event (on Win at least) gets passed to EventProcessor::OnEventFromSource twice, the first time from DesktopWindowTreeHostWin::HandleKeyEvent and the second time from WindowTreeHost::DispatchKeyEventPostIME. It happens so that the call to  WindowEventDispatcher::PreDispatchEvent actually sends event to ime and, if not handled there, again to OnEventFromSource resulting in recursive call.
To be honest I have not found a way it could cause bugs. But such behavior seems strange and unexpected. It also leads to execution of some code twice. Could you tell me if it is considered to be correct behaviour or be revised later?  Thanks!
Owner: ----
Status: Untriaged (was: Started)

Comment 6 by ovanieva@google.com, Aug 23 2017

Owner: sadrul@chromium.org
sadrul@ please triage

Comment 7 by sky@chromium.org, Dec 1 2017

Status: WontFix (was: Untriaged)
I responded over email, but I'm adding here for the record:

While weird, I believe this is expected in the case of no ime. The first pass ends up in WindowTreeHost::DispatchKeyEventPostIME() which sets WindowEventDispatcher::skip_ime so that second pass doesn't trigger going through IME and does the normal processing. The first pass ends earlier than the second pass because of DispatchKeyEventPostIME().

Sign in to add a comment