Commit 3b3c6a07 authored by Avery Musbach's avatar Avery Musbach Committed by Commit Bot

overview: Nix GetDropTarget()->OnSelectorItemDragStarted(dragged_item);

There is currently no important reason for
OverviewGrid::AddDropTargetForDraggingFromOverview to call
OverviewItem::OnSelectorItemDragStarted on the drop target. I originally
did that to hide the drop target's close button, but because it was
animated, the behavior was found unsatisfactory as described in
Issue 954642. [1] fixed the bug, and also removed the need for the
function call in question.

[1] https://chromium-review.googlesource.com/c/chromium/src/+/1900127

Bug: 954642
Change-Id: Iadef44cc213158a3cc797670a46c97c4f0aa2bb2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1962596
Commit-Queue: Avery Musbach <amusbach@chromium.org>
Reviewed-by: default avatarXiaoqian Dai <xdai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#724048}
parent 5548de35
......@@ -663,13 +663,6 @@ void OverviewGrid::AddDropTargetForDraggingFromOverview(
overview_session_->AddItem(drop_target_widget_->GetNativeWindow(),
/*reposition=*/true, /*animate=*/false,
/*ignored_items=*/{dragged_item}, position);
// This part is necessary because |OverviewItem::OnSelectorItemDragStarted| is
// called on all overview items before the drop target exists among them. That
// is because |AddDropTargetForDraggingFromOverview| is only called for drag
// to snap, but |OnSelectorItemDragStarted| is called before the drag has been
// disambiguated between drag to close and drag to snap.
GetDropTarget()->OnSelectorItemDragStarted(dragged_item);
}
void OverviewGrid::RemoveDropTarget() {
......
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