Commit 828cedfd authored by Evan Stade's avatar Evan Stade Committed by Commit Bot

Mash: Make Chrome update correct window's properties for immersive.

This makes ShelfLayoutManager::UpdateVisibilityState correctly update
state to SHELF_AUTO_HIDE, which triggers Shelf::AutoHideEventHandler,
which already works without updates.

Bug: 897968

Change-Id: Id2e5f785dbf24a0999088b13fe4971ee6758e32e
Reviewed-on: https://chromium-review.googlesource.com/c/1295176Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Evan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#601809}
parent e78b9a12
...@@ -108,7 +108,6 @@ class ASH_EXPORT ShelfLayoutManager ...@@ -108,7 +108,6 @@ class ASH_EXPORT ShelfLayoutManager
// Invoked by the shelf when the auto-hide state may have changed. // Invoked by the shelf when the auto-hide state may have changed.
void UpdateAutoHideState(); void UpdateAutoHideState();
// TODO(mash): Add similar event handling support for mash.
// Updates the auto-hide state for mouse events. // Updates the auto-hide state for mouse events.
void UpdateAutoHideForMouseEvent(ui::MouseEvent* event, aura::Window* target); void UpdateAutoHideForMouseEvent(ui::MouseEvent* event, aura::Window* target);
......
...@@ -27,7 +27,8 @@ ImmersiveContextMus::~ImmersiveContextMus() { ...@@ -27,7 +27,8 @@ ImmersiveContextMus::~ImmersiveContextMus() {
void ImmersiveContextMus::OnEnteringOrExitingImmersive( void ImmersiveContextMus::OnEnteringOrExitingImmersive(
ash::ImmersiveFullscreenController* controller, ash::ImmersiveFullscreenController* controller,
bool entering) { bool entering) {
aura::Window* window = controller->widget()->GetNativeWindow(); aura::Window* window =
controller->widget()->GetNativeWindow()->GetRootWindow();
// Auto hide the shelf in immersive fullscreen instead of hiding it. // Auto hide the shelf in immersive fullscreen instead of hiding it.
window->SetProperty(ash::kHideShelfWhenFullscreenKey, !entering); window->SetProperty(ash::kHideShelfWhenFullscreenKey, !entering);
// Update the window's immersive mode state for the window manager. // Update the window's immersive mode state for the window manager.
......
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