|
|
DescriptionFix WindowTreeHostManager::GetPrimaryRootWindow
When the last display is removed, the |primary_display_id| is set to
invalid. In this case, we should return root window of the
|primary_tree_host_for_replace_|.
BUG=718232
Test=tested on local device
Review-Url: https://codereview.chromium.org/2870253006
Cr-Commit-Position: refs/heads/master@{#471172}
Committed: https://chromium.googlesource.com/chromium/src/+/e8ce0ec0131153014f66ef73920527c25c0589d8
Patch Set 1 #
Total comments: 2
Patch Set 2 : Fix WindowTreeHostManager::GetPrimaryRootWindow #
Total comments: 2
Patch Set 3 : Reset primary_tree_host_for_replace_. #Messages
Total messages: 30 (18 generated)
wutao@chromium.org changed reviewers: + oshima@chromium.org, varkha@chromium.org
Hi Oshima, This is a potential fix suggested by varkha@. Tested on local device. It works. PTAL. Thanks, Tao
The CQ bit was checked by wutao@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
lgtm with a nit and a tangential comment. Thanks for looking into this! https://codereview.chromium.org/2870253006/diff/1/ash/shell.cc File ash/shell.cc (right): https://codereview.chromium.org/2870253006/diff/1/ash/shell.cc#newcode272 ash/shell.cc:272: WmWindow* wm_window = instance_->shell_port_->GetPrimaryRootWindow(); Not for this CL - WmWindow should probably go away here as we are using Aura as a client lib in mus_ash. Maybe a TODO to make shell_port.h use aura::Window* in place of WmWindow *. https://codereview.chromium.org/2870253006/diff/1/ash/wm/window_util.cc File ash/wm/window_util.cc (right): https://codereview.chromium.org/2870253006/diff/1/ash/wm/window_util.cc#newco... ash/wm/window_util.cc:66: aura::Window* GetActiveWindow() { nit: Maybe a comment about when primary root window might be null.
I wonder if there is a chance to add a test that tries removing a primary root window.
On 2017/05/10 22:25:21, varkha wrote: > I wonder if there is a chance to add a test that tries removing a primary root > window. What to test in this case? Can we force to set primary display id to invalid id. And test GetActiveWindow should return null.
Can you hold a sec? I think there is a better way.
On 2017/05/10 22:51:05, oshima wrote: > Can you hold a sec? I think there is a better way. Can you instead try changing WidowTreeHostManager::GetPrimaryDisplay to return the root window of primary_tree_host_for_replace_? You may want to send it to try bots first to see if there is any regression that it may cause.
Description was changed from ========== Fix ash::wm::GetActiveWindow. ash::Shell::GetPrimaryRootWindow could be nullptr when the only display is removed. In this situation, ash::wm::GetActiveWindow should return nullptr as well. BUG=718232 Test=tested on local device ========== to ========== Fix WindowTreeHostManager::GetPrimaryRootWindow When the last display is removed, the |primary_display_id| is set to invalid. In this case, we should return root window of the |primary_tree_host_for_replace_|. BUG=718232 Test=tested on local device ==========
The CQ bit was checked by wutao@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Hi Oshima, It passed all the tests. ptal. Thanks. Tao
one more change, then lgtm https://codereview.chromium.org/2870253006/diff/20001/ash/display/window_tree... File ash/display/window_tree_host_manager.cc (right): https://codereview.chromium.org/2870253006/diff/20001/ash/display/window_tree... ash/display/window_tree_host_manager.cc:639: controller->Shutdown(); can you reset the primary_tree_host_for_replace_ if it's same as host_to_delete here?
Hi Oshima, ptal. Thank you, Tao https://codereview.chromium.org/2870253006/diff/20001/ash/display/window_tree... File ash/display/window_tree_host_manager.cc (right): https://codereview.chromium.org/2870253006/diff/20001/ash/display/window_tree... ash/display/window_tree_host_manager.cc:639: controller->Shutdown(); On 2017/05/12 00:19:21, oshima wrote: > can you reset the primary_tree_host_for_replace_ if it's same as host_to_delete > here? Done.
The CQ bit was checked by wutao@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
slgtm
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by wutao@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from varkha@chromium.org, oshima@chromium.org Link to the patchset: https://codereview.chromium.org/2870253006/#ps40001 (title: "Reset primary_tree_host_for_replace_.")
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 40001, "attempt_start_ts": 1494553281060280, "parent_rev": "59da93bfe66eddf5da25f6cae760fb2813e4ae8d", "commit_rev": "e8ce0ec0131153014f66ef73920527c25c0589d8"}
Message was sent while issue was closed.
Description was changed from ========== Fix WindowTreeHostManager::GetPrimaryRootWindow When the last display is removed, the |primary_display_id| is set to invalid. In this case, we should return root window of the |primary_tree_host_for_replace_|. BUG=718232 Test=tested on local device ========== to ========== Fix WindowTreeHostManager::GetPrimaryRootWindow When the last display is removed, the |primary_display_id| is set to invalid. In this case, we should return root window of the |primary_tree_host_for_replace_|. BUG=718232 Test=tested on local device Review-Url: https://codereview.chromium.org/2870253006 Cr-Commit-Position: refs/heads/master@{#471172} Committed: https://chromium.googlesource.com/chromium/src/+/e8ce0ec0131153014f66ef739205... ==========
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/chromium/src/+/e8ce0ec0131153014f66ef739205... |