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

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

Issue 1580193002: mus: Do not notify clients when the roots are reordered. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 11 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/lib/window.cc ('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_impl.cc
diff --git a/components/mus/ws/window_tree_impl.cc b/components/mus/ws/window_tree_impl.cc
index 80690ca809f36efd813414863b43e11d8419696e..71532ce300ceef9cdd029eda2890a519ea2d336a 100644
--- a/components/mus/ws/window_tree_impl.cc
+++ b/components/mus/ws/window_tree_impl.cc
@@ -409,11 +409,18 @@ void WindowTreeImpl::ProcessWindowReorder(const ServerWindow* window,
const ServerWindow* relative_window,
mojom::OrderDirection direction,
bool originated_change) {
+ DCHECK_EQ(window->parent(), relative_window->parent());
if (originated_change || !IsWindowKnown(window) ||
!IsWindowKnown(relative_window) ||
connection_manager_->DidConnectionMessageClient(id_))
return;
+ // Do not notify ordering changes of the root windows, since the client
+ // doesn't know about the ancestors of the roots, and so can't do anything
+ // about this ordering change of the root.
+ if (HasRoot(window) || HasRoot(relative_window))
+ return;
+
client_->OnWindowReordered(MapWindowIdToClient(window),
MapWindowIdToClient(relative_window), direction);
connection_manager_->OnConnectionMessagedClient(id_);
« no previous file with comments | « components/mus/public/cpp/lib/window.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698