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

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

Issue 1868783003: Makes SetFocus() notify callback correctly on failure (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/ws/window_tree.h ('k') | no next file » | 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 61a37d051fdc306b885164d4e63f673b8db68079..b4624fb0b3ecd3694d268b89498efb24a00984bf 100644
--- a/components/mus/ws/window_tree.cc
+++ b/components/mus/ws/window_tree.cc
@@ -283,8 +283,7 @@ bool WindowTree::SetFocus(const ClientWindowId& window_id) {
return false;
Operation op(this, window_server_, OperationType::SET_FOCUS);
- window_server_->SetFocusedWindow(window);
- return true;
+ return window_server_->SetFocusedWindow(window);
}
bool WindowTree::Embed(const ClientWindowId& window_id,
@@ -347,6 +346,15 @@ void WindowTree::OnWindowManagerCreatedTopLevelWindow(
drawn);
}
+void WindowTree::AddActivationParent(const ClientWindowId& window_id) {
+ Display* host = GetDisplayForWindowManager();
+ if (!host)
+ return;
+ ServerWindow* window = GetWindowByClientId(window_id);
+ if (window)
+ host->AddActivationParent(window);
+}
+
void WindowTree::OnChangeCompleted(uint32_t change_id, bool success) {
client()->OnChangeCompleted(change_id, success);
}
@@ -1282,13 +1290,7 @@ void WindowTree::RemoveAccelerator(uint32_t id) {
}
void WindowTree::AddActivationParent(Id transport_window_id) {
- Display* host = GetDisplayForWindowManager();
- if (!host)
- return;
- ServerWindow* window =
- GetWindowByClientId(ClientWindowId(transport_window_id));
- if (window)
- host->AddActivationParent(window);
+ AddActivationParent(ClientWindowId(transport_window_id));
}
void WindowTree::RemoveActivationParent(Id transport_window_id) {
« no previous file with comments | « components/mus/ws/window_tree.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698