This is trivially seen when a new top level window is created and made visible. The window is visible, but it's drawn state is false.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e61c75b5abf6e7234b26f10bb0d493bb32fea073 commit e61c75b5abf6e7234b26f10bb0d493bb32fea073 Author: sky <sky@chromium.org> Date: Thu Apr 07 03:13:12 2016 Fixes problems with drawn state There were two problems with how the drawn state was previously communicated: . the drawn state included the visibility of the window. This meant that if a window was hidden it's drawn state was also false, so that when the visibility was made true the client didn't know that it should make the drawn state true as well. . the drawn state was communicated for all windows, when really all that matters is the drawn state of the root windows. To fix this I changed the following: . the drawn state is communicated via OnEmbed or OnTopLevelCreated(). . the drawn state is the drawn state of the windows parent, not the window. This way it doesn't included the visibility of the window. This fixes the problem I mentioned above so that when a client changes the visibility it doesn't impact the drawn state. . NewTopLevelWindow() sets drawn to true (which is generally what the wm will do). This way focus requests won't silently fail in the client. BUG= 600868 TEST=covered by tests R=ben@chromium.org Review URL: https://codereview.chromium.org/1864113002 Cr-Commit-Position: refs/heads/master@{#385641} [modify] https://crrev.com/e61c75b5abf6e7234b26f10bb0d493bb32fea073/components/mus/public/cpp/lib/window.cc [modify] https://crrev.com/e61c75b5abf6e7234b26f10bb0d493bb32fea073/components/mus/public/cpp/lib/window_private.h [modify] https://crrev.com/e61c75b5abf6e7234b26f10bb0d493bb32fea073/components/mus/public/cpp/lib/window_tree_client_impl.cc [modify] https://crrev.com/e61c75b5abf6e7234b26f10bb0d493bb32fea073/components/mus/public/cpp/lib/window_tree_client_impl.h [modify] https://crrev.com/e61c75b5abf6e7234b26f10bb0d493bb32fea073/components/mus/public/cpp/tests/window_tree_client_impl_unittest.cc [modify] https://crrev.com/e61c75b5abf6e7234b26f10bb0d493bb32fea073/components/mus/public/cpp/tests/window_unittest.cc [modify] https://crrev.com/e61c75b5abf6e7234b26f10bb0d493bb32fea073/components/mus/public/cpp/window.h [modify] https://crrev.com/e61c75b5abf6e7234b26f10bb0d493bb32fea073/components/mus/public/interfaces/window_tree.mojom [modify] https://crrev.com/e61c75b5abf6e7234b26f10bb0d493bb32fea073/components/mus/ws/test_change_tracker.cc [modify] https://crrev.com/e61c75b5abf6e7234b26f10bb0d493bb32fea073/components/mus/ws/test_change_tracker.h [modify] https://crrev.com/e61c75b5abf6e7234b26f10bb0d493bb32fea073/components/mus/ws/test_utils.cc [modify] https://crrev.com/e61c75b5abf6e7234b26f10bb0d493bb32fea073/components/mus/ws/test_utils.h [modify] https://crrev.com/e61c75b5abf6e7234b26f10bb0d493bb32fea073/components/mus/ws/window_tree.cc [modify] https://crrev.com/e61c75b5abf6e7234b26f10bb0d493bb32fea073/components/mus/ws/window_tree_client_unittest.cc [modify] https://crrev.com/e61c75b5abf6e7234b26f10bb0d493bb32fea073/components/mus/ws/window_tree_unittest.cc
Bulk verified
Comment 1 by sky@chromium.org
, Apr 7 2016