Commit 87687c53 authored by Mitsuru Oshima's avatar Mitsuru Oshima Committed by Commit Bot

Check the current immersive state before setting the property

Updating to the same value can cause shelf state update. Check
the value before setting.

This is to merge 71. I'll change the impl side for 72.

Bug: 895744
Test: manual. see bug for repro step.
Change-Id: I9aad35098fc120dbfae365ddb79faf6af0069881
Reviewed-on: https://chromium-review.googlesource.com/c/1316590Reviewed-by: default avatarTao Wu <wutao@chromium.org>
Commit-Queue: Mitsuru Oshima <oshima@chromium.org>
Cr-Commit-Position: refs/heads/master@{#605119}
parent 6efb4dae
...@@ -297,7 +297,9 @@ void ImmersiveFullscreenController::UnlockRevealedState() { ...@@ -297,7 +297,9 @@ void ImmersiveFullscreenController::UnlockRevealedState() {
// static // static
void ImmersiveFullscreenController::EnableForWidget(views::Widget* widget, void ImmersiveFullscreenController::EnableForWidget(views::Widget* widget,
bool enabled) { bool enabled) {
widget->GetNativeWindow()->SetProperty(kImmersiveIsActive, enabled); auto* window = widget->GetNativeWindow();
if (window->GetProperty(kImmersiveIsActive) != enabled)
widget->GetNativeWindow()->SetProperty(kImmersiveIsActive, enabled);
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
......
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