MCPcopy Create free account
hub / github.com/GNOME/gnome-shell / handleDragOverInternal

Method handleDragOverInternal

js/ui/workspaceThumbnail.js:517–535  ·  view source on GitHub ↗
(source, actor, time)

Source from the content-addressed store, hash-verified

515
516 // Draggable target interface used only by ThumbnailsBox
517 handleDragOverInternal(source, actor, time) {
518 if (source === Main.xdndHandler) {
519 this.metaWorkspace.activate(time);
520 return DND.DragMotionResult.CONTINUE;
521 }
522
523 if (this.state > ThumbnailState.NORMAL)
524 return DND.DragMotionResult.CONTINUE;
525
526 if (source.metaWindow &&
527 !this._isMyWindow(source.metaWindow.get_compositor_private()))
528 return DND.DragMotionResult.MOVE_DROP;
529 if (source.app && source.app.can_open_new_window())
530 return DND.DragMotionResult.COPY_DROP;
531 if (!source.app && source.shellWorkspaceLaunch)
532 return DND.DragMotionResult.COPY_DROP;
533
534 return DND.DragMotionResult.CONTINUE;
535 }
536
537 acceptDropInternal(source, actor, time) {
538 if (this.state > ThumbnailState.NORMAL)

Callers 1

handleDragOverMethod · 0.80

Calls 2

_isMyWindowMethod · 0.95
activateMethod · 0.45

Tested by

no test coverage detected