Commit 0c984247 authored by nancylingwang's avatar nancylingwang Committed by Commit Bot

Recover icons on multiple monitors when release the dragged icon.

With multiple monitors, when launch an app unpin on the shelf, and drag
the icon for the launched app, the icon is ripped off from the shelf on
all monitors, because the icon opacity is set as 0.0f (transparent):
https://source.chromium.org/chromium/chromium/src/+/master:ash/shelf/shelf_view.cc;l=2155

However, when release the button to restore the icon back to the Shelf,
only the icon on 1 monitor pulled by the mouse is recovered because the
opacity for the icon is restored to 1.0, not transparent by the drag
view:
drag_view_->layer()->SetOpacity(1.0f);

Well other icons on other monitors are not recovered. So modify the drag
rip off handling to recover other icons on other monitors when release
the mouse for the drag icon.

BUG=1119698

Change-Id: I49439a7c02c18b0875c53772bd0081a016ab720d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2367261
Commit-Queue: Nancy Wang <nancylingwang@chromium.org>
Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#800579}
parent f7429dc0
......@@ -1661,6 +1661,7 @@ void ShelfView::FinalizeRipOffDrag(bool cancel) {
AnimateToIdealBounds();
}
drag_view_->layer()->SetOpacity(1.0f);
model_->OnItemReturnedFromRipOff(model_->item_count() - 1);
}
DestroyDragIconProxy();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment