overview: Only accept AppIcon drops if the app can open a new window

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/121
This commit is contained in:
Jonas Dreßler
2019-05-02 17:04:03 +02:00
committed by Florian Müllner
parent 00e95de114
commit 23344701de
2 changed files with 7 additions and 7 deletions

View File

@ -1994,7 +1994,7 @@ var Workspace = class {
handleDragOver(source, _actor, _x, _y, _time) {
if (source.realWindow && !this._isMyWindow(source.realWindow))
return DND.DragMotionResult.MOVE_DROP;
if (source.app)
if (source.app && source.app.can_open_new_window())
return DND.DragMotionResult.COPY_DROP;
if (!source.app && source.shellWorkspaceLaunch)
return DND.DragMotionResult.COPY_DROP;
@ -2031,7 +2031,7 @@ var Workspace = class {
metaWindow.change_workspace_by_index(workspaceIndex, false);
return true;
} else if (source.app) {
} else if (source.app && source.app.can_open_new_window()) {
source.app.open_new_window(workspaceIndex);
return true;
} else if (!source.app && source.shellWorkspaceLaunch) {