Skip to content

Commit

Permalink
arc/gio: Fix the Alt+Tab logic
Browse files Browse the repository at this point in the history
Tab is used for Accessibility to focus on the menu button. After we
received the Tab press key event, we discarded it. Now we continue to
send Tab press event, which is consistent to Tab release key event. This
fixes the issue of after Alt+Tab focusing back to GIO window, the Search
key doesn't response.

Also reset the text input status when unregistering the window, which
fixes the issue of keys not responding after pressing Search.

Bug: b:239618743
Test: manual test to check if the bugs are reproducible.
Test: unittest
Change-Id: Ife145eebe5e2b9e08a2c11973b033cca0bde397e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3778325
Reviewed-by: David Jacobo <djacobo@chromium.org>
Auto-Submit: Cici Ruan <cuicuiruan@google.com>
Commit-Queue: Cici Ruan <cuicuiruan@google.com>
Cr-Commit-Position: refs/heads/main@{#1026529}
  • Loading branch information
Cici Ruan authored and Chromium LUCI CQ committed Jul 21, 2022
1 parent b20e0f0 commit 862b36e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ void ArcInputOverlayManager::UnRegisterWindow(aura::Window* window) {
it->second->UnRegisterEventRewriter();
RemoveDisplayOverlayController();
RemoveObserverFromInputMethod();
it->second->NotifyTextInputState(false);
registered_top_level_window_ = nullptr;
}

Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/ash/arc/input_overlay/touch_injector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ ui::EventDispatchDetails TouchInjector::RewriteEvent(
CleanupTouchEvents();
display_overlay_controller_->SetDisplayMode(DisplayMode::kPreMenu);
}
return DiscardEvent(continuation);
return SendEvent(continuation, &event);
} else if (display_mode_ == DisplayMode::kPreMenu) {
if (event.IsKeyEvent()) {
auto* key_event = event.AsKeyEvent();
Expand Down

0 comments on commit 862b36e

Please sign in to comment.