Commit b46b8745 authored by Sammie Quon's avatar Sammie Quon Committed by Commit Bot

system: Fix tray transition on login when changing to tablet mode.

Test: manual
Bug: 864236
Change-Id: I6429eb0c469ab473d5edf5db57e717c20e1d28fe
Reviewed-on: https://chromium-review.googlesource.com/1141080Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Reviewed-by: default avatarTetsui Ohkubo <tetsui@chromium.org>
Commit-Queue: Sammie Quon <sammiequon@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576512}
parent a6b665da
......@@ -21,7 +21,6 @@
#include "ash/system/tray/system_tray.h"
#include "ash/system/unified/unified_system_tray.h"
#include "ash/system/virtual_keyboard/virtual_keyboard_tray.h"
#include "ash/wm/tablet_mode/tablet_mode_controller.h"
#include "base/command_line.h"
#include "base/i18n/time_formatting.h"
#include "ui/base/ui_base_features.h"
......@@ -189,11 +188,12 @@ void StatusAreaWidget::SetSystemTrayVisibility(bool visible) {
}
TrayBackgroundView* StatusAreaWidget::GetSystemTrayAnchor() const {
if (Shell::Get()
->tablet_mode_controller()
->IsTabletModeWindowManagerEnabled()) {
// Use the target visibility of the layer instead of the visibility of the
// view because the view is still visible when fading away, but we do not want
// to anchor to this element in that case.
if (overview_button_tray_->layer()->GetTargetVisibility())
return overview_button_tray_.get();
}
if (unified_system_tray_)
return unified_system_tray_.get();
return system_tray_.get();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment