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

Unified Diff: ash/wm/toplevel_window_event_handler.cc

Issue 12220026: ash: Do not allow minimizing windows in login screen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add-test Created 7 years, 10 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 | « ash/wm/property_util.cc ('k') | ash/wm/toplevel_window_event_handler_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/toplevel_window_event_handler.cc
diff --git a/ash/wm/toplevel_window_event_handler.cc b/ash/wm/toplevel_window_event_handler.cc
index 4320a7ff52350477cf22fd5c3208a0566348ce1b..33360d157fa66937ca261a63ec64f737b8f1b63d 100644
--- a/ash/wm/toplevel_window_event_handler.cc
+++ b/ash/wm/toplevel_window_event_handler.cc
@@ -212,7 +212,8 @@ void ToplevelWindowEventHandler::OnGestureEvent(ui::GestureEvent* event) {
if (fabs(event->details().velocity_y()) >
kMinVertVelocityForWindowMinimize) {
// Minimize/maximize.
- if (event->details().velocity_y() > 0) {
+ if (event->details().velocity_y() > 0 &&
+ wm::CanMinimizeWindow(target)) {
wm::MinimizeWindow(target);
SetWindowAlwaysRestoresToRestoreBounds(target, true);
SetRestoreBoundsInParent(target, pre_drag_window_bounds_);
« no previous file with comments | « ash/wm/property_util.cc ('k') | ash/wm/toplevel_window_event_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698