Commit c034b9e7 authored by Vladislav Kaznacheev's avatar Vladislav Kaznacheev Committed by Commit Bot

Fix hidden shelf reveal on mouse hover

On some scale factors the bottom most pixel is outside of
the display bounds. Snapping shelf region to display edge fixes
the problem.

Bug: 899007
Test: manual
Change-Id: I1eeb342756b46e683d0f30f96f1c428fbb74d7ca
Reviewed-on: https://chromium-review.googlesource.com/c/1320013Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Reviewed-by: default avatarManu Cornet <manucornet@chromium.org>
Commit-Queue: Vladislav Kaznacheev <kaznacheev@chromium.org>
Cr-Commit-Position: refs/heads/master@{#605748}
parent e2c76c0d
...@@ -942,7 +942,8 @@ gfx::Rect ShelfLayoutManager::GetVisibleShelfBounds() const { ...@@ -942,7 +942,8 @@ gfx::Rect ShelfLayoutManager::GetVisibleShelfBounds() const {
gfx::Rect shelf_region = shelf_widget_->GetWindowBoundsInScreen(); gfx::Rect shelf_region = shelf_widget_->GetWindowBoundsInScreen();
DCHECK(!display_.bounds().IsEmpty()); DCHECK(!display_.bounds().IsEmpty());
shelf_region.Intersect(display_.bounds()); shelf_region.Intersect(display_.bounds());
return shelf_region; return screen_util::SnapBoundsToDisplayEdge(shelf_region,
shelf_widget_->GetNativeWindow());
} }
gfx::Rect ShelfLayoutManager::GetAutoHideShowShelfRegionInScreen() const { gfx::Rect ShelfLayoutManager::GetAutoHideShowShelfRegionInScreen() const {
......
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