appDisplay: Allow overshooting any icon

Now that the icon being dragged can come from AppDisplay and also
a folder dialog, the check for when to overshoot is broken. Check
if the icon is a BaseAppView icon.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1284
This commit is contained in:
Georges Basile Stavracas Neto 2020-05-27 15:49:29 -03:00 committed by Florian Müllner
parent b64ce217e4
commit d1cbf6c7a9

View File

@ -1056,7 +1056,7 @@ class AppDisplay extends BaseAppView {
// Handle the drag overshoot. When dragging to above the
// icon grid, move to the page above; when dragging below,
// move to the page below.
if (this._grid.contains(appIcon))
if (appIcon instanceof AppViewItem)
this._handleDragOvershoot(dragEvent);
this._maybeMoveItem(dragEvent);