New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 641355 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Dec 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Feature

Blocking:
issue 672585



Sign in to add a comment

Send both char and non-char events from client to the IME driver.

Project Member Reported by moshayedi@chromium.org, Aug 26 2016

Issue description

In 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. 
 
Labels: Proj-Mustash
Components: Internals>MUS
Project Member

Comment 3 by bugdroid1@chromium.org, 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

Blocking: 672585
Status: Fixed (was: Assigned)
Components: -Internals>MUS Internals>Services>WindowService
Components: -MUS

Sign in to add a comment