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

Unified Diff: ash/shelf/shelf_view.cc

Issue 492963008: Ash: Double-clicking on a shelf item now opens the item (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | ash/shelf/shelf_view_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_view.cc
diff --git a/ash/shelf/shelf_view.cc b/ash/shelf/shelf_view.cc
index 5e4f00255c028296401e34233c241e8af1e0803f..9e012423c2306311040bb1be5c9d32c2e6346060 100644
--- a/ash/shelf/shelf_view.cc
+++ b/ash/shelf/shelf_view.cc
@@ -1669,6 +1669,13 @@ void ShelfView::ButtonPressed(views::Button* sender, const ui::Event& event) {
if (!IsUsableEvent(event))
return;
+ // Don't activate the item twice on double-click. Otherwise the window starts
+ // animating open due to the first click, then immediately minimizes due to
+ // the second click. The user most likely intended to open or minimize the
+ // item once, not do both.
+ if (event.flags() & ui::EF_IS_DOUBLE_CLICK)
+ return;
+
{
ScopedTargetRootWindow scoped_target(
sender->GetWidget()->GetNativeView()->GetRootWindow());
« no previous file with comments | « no previous file | ash/shelf/shelf_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698