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

Unified Diff: ash/common/wm/drag_details.cc

Issue 2666413002: Fix opacity getting stuck when clicking on a new window while it's being created (Closed)
Patch Set: Adding more info Created 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/wm/drag_details.cc
diff --git a/ash/common/wm/drag_details.cc b/ash/common/wm/drag_details.cc
index 1f8f93be44ee8a2a2a34a67e30baa242d00a86b5..73815a41eff661689edb01ef949a23737c47f3a0 100644
--- a/ash/common/wm/drag_details.cc
+++ b/ash/common/wm/drag_details.cc
@@ -50,7 +50,10 @@ DragDetails::DragDetails(WmWindow* window,
: initial_state_type(window->GetWindowState()->GetStateType()),
initial_bounds_in_parent(window->GetBounds()),
initial_location_in_parent(location),
- initial_opacity(window->GetLayer()->opacity()),
+ // When drag starts, we might be in the middle of a window opacity
+ // animation, on drag completion we must set the opacity to the target
+ // opacity rather than the current opacity (crbug.com/687003).
+ initial_opacity(window->GetLayer()->GetTargetOpacity()),
sky 2017/02/06 22:37:59 This is subtle. I would be nice to have test cover
window_component(window_component),
bounds_change(
WindowResizer::GetBoundsChangeForWindowComponent(window_component)),
« 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