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

Unified Diff: components/mus/ws/window_tree.cc

Issue 1979323002: mus: Show USER_PRIVATE window container during views tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@widgetinteractive
Patch Set: rebase, fix linux Created 4 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 | « components/mus/public/cpp/tests/window_server_shelltest_base.cc ('k') | mash/wm/root_window_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/ws/window_tree.cc
diff --git a/components/mus/ws/window_tree.cc b/components/mus/ws/window_tree.cc
index 6a1dd4fc64640a2f8cb9392f9a29d1cc8660fbdd..0e6a4aa4700321693de6c0282cee1d2873756c3f 100644
--- a/components/mus/ws/window_tree.cc
+++ b/components/mus/ws/window_tree.cc
@@ -294,18 +294,28 @@ bool WindowTree::SetWindowOpacity(const ClientWindowId& window_id,
bool WindowTree::SetFocus(const ClientWindowId& window_id) {
ServerWindow* window = GetWindowByClientId(window_id);
ServerWindow* currently_focused = window_server_->GetFocusedWindow();
- if (!currently_focused && !window)
+ if (!currently_focused && !window) {
+ DVLOG(1) << "SetFocus failure, no focused window to clear.";
return false;
+ }
Display* display = GetDisplay(window);
- if (window && (!display || !window->can_focus() || !window->IsDrawn()))
+ if (window && (!display || !window->can_focus() || !window->IsDrawn())) {
+ DVLOG(1) << "SetFocus failure, window cannot be focused.";
return false;
+ }
- if (!access_policy_->CanSetFocus(window))
+ if (!access_policy_->CanSetFocus(window)) {
+ DVLOG(1) << "SetFocus failure, blocked by access policy.";
return false;
+ }
Operation op(this, window_server_, OperationType::SET_FOCUS);
- return window_server_->SetFocusedWindow(window);
+ bool success = window_server_->SetFocusedWindow(window);
+ if (!success) {
+ DVLOG(1) << "SetFocus failure, could not SetFocusedWindow.";
+ }
+ return success;
}
bool WindowTree::Embed(const ClientWindowId& window_id,
« no previous file with comments | « components/mus/public/cpp/tests/window_server_shelltest_base.cc ('k') | mash/wm/root_window_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698