Commit 5f5994a6 authored by Manu Cornet's avatar Manu Cornet Committed by Commit Bot

CrOS Shelf: Use default hit test logic in unknown session state

This should help with flaky tests reported in the linked bug.

Bug: 934558
Change-Id: I78b09e596d7da42c3c483598f62e969fff017309
Reviewed-on: https://chromium-review.googlesource.com/c/1487145
Commit-Queue: Manu Cornet <manucornet@chromium.org>
Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#635688}
parent ae50f0f0
...@@ -51,11 +51,14 @@ bool ShelfWindowTargeter::GetHitTestRects( ...@@ -51,11 +51,14 @@ bool ShelfWindowTargeter::GetHitTestRects(
gfx::Rect* hit_test_rect_mouse, gfx::Rect* hit_test_rect_mouse,
gfx::Rect* hit_test_rect_touch) const { gfx::Rect* hit_test_rect_touch) const {
// We only want to special case a very specific situation where we are not // We only want to special case a very specific situation where we are not
// currently in an active session and change only the behavior of the login // currently in an active session (or unknown session state) and change only
// shelf. On secondary displays, the login shelf will not be visible. // the behavior of the login shelf. On secondary displays, the login shelf
// will not be visible.
if (target->id() == kShellWindowId_ShelfContainer && shelf_->IsVisible() && if (target->id() == kShellWindowId_ShelfContainer && shelf_->IsVisible() &&
Shell::Get()->session_controller()->GetSessionState() != Shell::Get()->session_controller()->GetSessionState() !=
session_manager::SessionState::ACTIVE) { session_manager::SessionState::ACTIVE &&
Shell::Get()->session_controller()->GetSessionState() !=
session_manager::SessionState::UNKNOWN) {
// When this is the case, let events pass through the "empty" part of // When this is the case, let events pass through the "empty" part of
// the shelf. // the shelf.
return shelf_->shelf_widget()->GetHitTestRects(target, hit_test_rect_mouse, return shelf_->shelf_widget()->GetHitTestRects(target, hit_test_rect_mouse,
......
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