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

Unified Diff: services/ui/ws/window_manager_display_root.cc

Issue 2863913004: chromeos: makes mus send keyevents to display root when nothing has focus (Closed)
Patch Set: GetClientVisibleRoot Created 3 years, 7 months 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
« no previous file with comments | « services/ui/ws/window_manager_display_root.h ('k') | services/ui/ws/window_manager_state.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/window_manager_display_root.cc
diff --git a/services/ui/ws/window_manager_display_root.cc b/services/ui/ws/window_manager_display_root.cc
index 5a933de2c07c1e4cfd1af4b4504cfb7dd2b64e4c..cd0d7efbf1f00dddaa63face09b7a4aa6fab65b2 100644
--- a/services/ui/ws/window_manager_display_root.cc
+++ b/services/ui/ws/window_manager_display_root.cc
@@ -11,7 +11,9 @@
#include "services/ui/ws/display.h"
#include "services/ui/ws/display_manager.h"
#include "services/ui/ws/server_window.h"
+#include "services/ui/ws/window_manager_state.h"
#include "services/ui/ws/window_server.h"
+#include "services/ui/ws/window_tree.h"
namespace ui {
namespace ws {
@@ -39,6 +41,15 @@ WindowManagerDisplayRoot::WindowManagerDisplayRoot(Display* display)
WindowManagerDisplayRoot::~WindowManagerDisplayRoot() {}
+const ServerWindow* WindowManagerDisplayRoot::GetClientVisibileRoot() const {
+ if (window_manager_state_->window_tree()
+ ->automatically_create_display_roots()) {
+ return root_.get();
+ }
+
+ return root_->children().empty() ? nullptr : root_->children()[0];
+}
+
WindowServer* WindowManagerDisplayRoot::window_server() {
return display_->window_server();
}
« no previous file with comments | « services/ui/ws/window_manager_display_root.h ('k') | services/ui/ws/window_manager_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698