Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1170)

Unified Diff: ash/shelf/shelf_layout_manager.cc

Issue 23591049: Do not show auto-hidden shelf when dragging a window (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_275801
Patch Set: Do not show auto-hidden shelf when dragging a window Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_layout_manager.cc
diff --git a/ash/shelf/shelf_layout_manager.cc b/ash/shelf/shelf_layout_manager.cc
index 84fef37d56675d892fe39102a8e48de23a00915c..c1103e0c63e8910c38b10e1f83d7890aaa55a6a3 100644
--- a/ash/shelf/shelf_layout_manager.cc
+++ b/ash/shelf/shelf_layout_manager.cc
@@ -998,6 +998,10 @@ ShelfAutoHideState ShelfLayoutManager::CalculateAutoHideState(
if (shelf_->IsActive() || shelf_->status_area_widget()->IsActive())
return SHELF_AUTO_HIDE_SHOWN;
+ // Don't show if the user is dragging the mouse.
+ if (auto_hide_event_filter_.get() && auto_hide_event_filter_->in_mouse_drag())
+ return SHELF_AUTO_HIDE_HIDDEN;
flackr 2013/09/16 20:55:06 Won't this only work for mouse drags and not touch
varkha 2013/09/17 04:36:43 Correct on both accounts. Dragging on empty deskto
+
const std::vector<aura::Window*> windows =
ash::MruWindowTracker::BuildWindowList(false);
@@ -1018,10 +1022,6 @@ ShelfAutoHideState ShelfLayoutManager::CalculateAutoHideState(
if (gesture_drag_status_ == GESTURE_DRAG_COMPLETE_IN_PROGRESS)
return gesture_drag_auto_hide_state_;
- // Don't show if the user is dragging the mouse.
- if (auto_hide_event_filter_.get() && auto_hide_event_filter_->in_mouse_drag())
- return SHELF_AUTO_HIDE_HIDDEN;
-
// Ignore the mouse position if mouse events are disabled.
aura::client::CursorClient* cursor_client = aura::client::GetCursorClient(
shelf_->GetNativeWindow()->GetRootWindow());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698