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

Unified Diff: components/exo/shell_surface.cc

Issue 2861523002: Do not disable minimize animation for maximized/fullscreened exo windows (Closed)
Patch Set: Created 3 years, 8 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: components/exo/shell_surface.cc
diff --git a/components/exo/shell_surface.cc b/components/exo/shell_surface.cc
index ffa7d00d1871efd3253c2ce536d3e88c61f3c816..0b983c2dda090c6499253e07700876efe0d3d330 100644
--- a/components/exo/shell_surface.cc
+++ b/components/exo/shell_surface.cc
@@ -933,8 +933,12 @@ void ShellSurface::OnPreWindowStateTypeChange(
ash::wm::WindowState* window_state,
ash::wm::WindowStateType old_type) {
ash::wm::WindowStateType new_type = window_state->GetStateType();
- if (ash::wm::IsMaximizedOrFullscreenOrPinnedWindowStateType(old_type) ||
- ash::wm::IsMaximizedOrFullscreenOrPinnedWindowStateType(new_type)) {
+ bool fromOrToMinimize = old_type == ash::wm::WINDOW_STATE_TYPE_MINIMIZED ||
reveman 2017/05/03 20:47:42 nit: "bool from_or_to_minimize" but maybe a bit cl
oshima 2017/05/03 21:33:16 Done.
+ new_type == ash::wm::WINDOW_STATE_TYPE_MINIMIZED;
+
+ if (!fromOrToMinimize &&
+ (ash::wm::IsMaximizedOrFullscreenOrPinnedWindowStateType(old_type) ||
+ ash::wm::IsMaximizedOrFullscreenOrPinnedWindowStateType(new_type))) {
// When transitioning in/out of maximized or fullscreen mode we need to
// make sure we have a configure callback before we allow the default
// cross-fade animations. The configure callback provides a mechanism for
« 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