Send both char and non-char events from client to the IME driver. |
|||||
Issue descriptionIn InputMethodMus::DispatchKeyEvent() we temporarily don't send non-char events to IME driver so accelerators work in Mus+ash. This is because we send event acks too early from client to Mus. After we fix this, we should send both char and non-char events to the IME driver. Some more context follows (I'll do more investigation and make corrections if I misunderstood anything here): When Mus server sends an event for processing to a client, the clients must notify the Mus server whether they have consumed the event or not (see the comments for OnWindowInputEvent and related functions in //services/ui/public/interfaces/window_tree.mojom). Mus server uses this information to decide whether to call accelerators (e.g. Ctrl+N for new window) or not. In the code this happens in NativeWidgetMus::OnWindowInputEvent(). First we try dispatching the event, then set information whether we consumed the event or not. In implementation of InputMethodMus::DispatchKeyEvent() (see https://codereview.chromium.org/2230393002/), I thought we can do similar to what we are doing in ChromeOS: Send the key events to the input method, and mark them as consumed. If the input method doesn't handle them, then call DispatchKeyEventPostIME() to do post IME processing. The problem here is that when I mark the key events as consumed, then the code NativeWidgetMus::OnWindowInputEvent() immediately notifies the Mus server that we handled the event, and accelerators are not tried. So, we need to solve this problem.
,
Oct 4 2016
,
Oct 17 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a2a7eed25d00d069b36bba9a91de4e1c1473a62e commit a2a7eed25d00d069b36bba9a91de4e1c1473a62e Author: moshayedi <moshayedi@chromium.org> Date: Mon Oct 17 16:44:56 2016 IME for Mus: Send ack for key events after IME driver processes the event. Before this CL, we sent event ack back to window server without waiting to see if IME could handle the event or not. This caused some problems with post-target accelerators (see bug description for more details). This CL fixes the issue by delaying the ack until IME driver tells the client if it could handle the event or not. BUG= 641355 Review-Url: https://codereview.chromium.org/2412593002 Cr-Commit-Position: refs/heads/master@{#425701} [modify] https://crrev.com/a2a7eed25d00d069b36bba9a91de4e1c1473a62e/services/ui/ime/ime_unittest.cc [modify] https://crrev.com/a2a7eed25d00d069b36bba9a91de4e1c1473a62e/services/ui/ime/test_ime_driver/test_ime_driver.cc [modify] https://crrev.com/a2a7eed25d00d069b36bba9a91de4e1c1473a62e/services/ui/public/interfaces/ime.mojom [modify] https://crrev.com/a2a7eed25d00d069b36bba9a91de4e1c1473a62e/ui/views/mus/input_method_mus.cc [modify] https://crrev.com/a2a7eed25d00d069b36bba9a91de4e1c1473a62e/ui/views/mus/input_method_mus.h [modify] https://crrev.com/a2a7eed25d00d069b36bba9a91de4e1c1473a62e/ui/views/mus/native_widget_mus.cc [modify] https://crrev.com/a2a7eed25d00d069b36bba9a91de4e1c1473a62e/ui/views/mus/native_widget_mus.h [modify] https://crrev.com/a2a7eed25d00d069b36bba9a91de4e1c1473a62e/ui/views/mus/text_input_client_impl.cc [modify] https://crrev.com/a2a7eed25d00d069b36bba9a91de4e1c1473a62e/ui/views/mus/text_input_client_impl.h [modify] https://crrev.com/a2a7eed25d00d069b36bba9a91de4e1c1473a62e/ui/views/mus/window_tree_host_mus.cc [modify] https://crrev.com/a2a7eed25d00d069b36bba9a91de4e1c1473a62e/ui/views/mus/window_tree_host_mus.h
,
Dec 8 2016
,
Feb 26 2018
,
Feb 26 2018
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by rjkroege@chromium.org
, Oct 4 2016