0

Show resizable button when app is launched

When an app with resize state OFF is launched, EnableResizeLock()
isn't called but we still need to show the compat mode button.

Bug: 191840916
Test: Press the resizable button and relaunch the app
Change-Id: I611f6ef06dac26e0983079cbf7a4c776ba46fb16
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2981932
Reviewed-by: Yuichiro Hanada <yhanada@chromium.org>
Reviewed-by: Toshiki Kikuchi <toshikikikuchi@chromium.org>
Commit-Queue: Kazuki Takise <takise@chromium.org>
Auto-Submit: Kazuki Takise <takise@chromium.org>
Cr-Commit-Position: refs/heads/master@{#895931}
This commit is contained in:
Kazuki Takise
2021-06-25 05:31:20 +00:00
committed by Chromium LUCI CQ
parent 188513754c
commit f64dc49b4d

@ -86,6 +86,8 @@ void ArcResizeLockManager::OnWindowPropertyChanged(aura::Window* window,
if (window->GetProperty(ash::kAppIDKey) == nullptr)
return;
UpdateCompatModeButton(window);
const ash::ArcResizeLockType current_resize_lock_value =
window->GetProperty(ash::kArcResizeLockTypeKey);
const bool resize_lock_changed =
@ -134,7 +136,6 @@ void ArcResizeLockManager::EnableResizeLock(aura::Window* window) {
is_first_launch = true;
}
UpdateCompatModeButton(window);
// Show lock shadow effect on window. ash::Shell may not exist in tests.
if (ash::Shell::HasInstance())
ash::Shell::Get()->resize_shadow_controller()->ShowShadow(window);
@ -150,7 +151,6 @@ void ArcResizeLockManager::EnableResizeLock(aura::Window* window) {
}
void ArcResizeLockManager::DisableResizeLock(aura::Window* window) {
UpdateCompatModeButton(window);
// Hide shadow effect on window. ash::Shell may not exist in tests.
if (ash::Shell::HasInstance())
ash::Shell::Get()->resize_shadow_controller()->HideShadow(window);