Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(271)

Unified Diff: components/exo/shell_surface.cc

Issue 2530073002: Add kAccessibilityFocusFallsbackToWidget property (Closed)
Patch Set: Fix condition in DCHECK Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/exo/shell_surface.cc
diff --git a/components/exo/shell_surface.cc b/components/exo/shell_surface.cc
index d8b5e7bf93935ef26dd9c7197b5e23f402382458..bcd44b4471501e5e5a6f4c16602ddc62bd1dd907 100644
--- a/components/exo/shell_surface.cc
+++ b/components/exo/shell_surface.cc
@@ -1020,6 +1020,12 @@ void ShellSurface::CreateShellSurfaceWidget(ui::WindowShowState show_state) {
widget_ = new ShellSurfaceWidget(this);
widget_->Init(params);
+ // Make root view of ShellSurfaceWidget non-focusable. If it's focusable,
+ // accessibility service will put focus on it and consumes key events.
+ views::View* root_view = widget_->GetRootView();
+ DCHECK(root_view);
+ root_view->SetFocusBehavior(views::View::FocusBehavior::NEVER);
+
aura::Window* window = widget_->GetNativeWindow();
window->SetName("ExoShellSurface");
window->AddChild(surface_->window());

Powered by Google App Engine
This is Rietveld 408576698