(source, actor, x, y, time)
| 1413 | } |
| 1414 | |
| 1415 | acceptDrop(source, actor, x, y, time) { |
| 1416 | const workspaceManager = global.workspace_manager; |
| 1417 | const workspaceIndex = this.metaWorkspace |
| 1418 | ? this.metaWorkspace.index() |
| 1419 | : workspaceManager.get_active_workspace_index(); |
| 1420 | |
| 1421 | if (source.metaWindow) { |
| 1422 | const window = source.metaWindow; |
| 1423 | if (this._isMyWindow(window)) |
| 1424 | return false; |
| 1425 | |
| 1426 | Main.moveWindowToMonitorAndWorkspace(window, |
| 1427 | this.monitorIndex, workspaceIndex); |
| 1428 | return true; |
| 1429 | } else if (source.app && source.app.can_open_new_window()) { |
| 1430 | if (source.animateLaunchAtPos) |
| 1431 | source.animateLaunchAtPos(actor.x, actor.y); |
| 1432 | |
| 1433 | source.app.open_new_window(workspaceIndex); |
| 1434 | return true; |
| 1435 | } else if (!source.app && source.shellWorkspaceLaunch) { |
| 1436 | // While unused in our own drag sources, shellWorkspaceLaunch allows |
| 1437 | // extensions to define custom actions for their drag sources. |
| 1438 | source.shellWorkspaceLaunch({ |
| 1439 | workspace: workspaceIndex, |
| 1440 | timestamp: time, |
| 1441 | }); |
| 1442 | return true; |
| 1443 | } |
| 1444 | |
| 1445 | return false; |
| 1446 | } |
| 1447 | |
| 1448 | get stateAdjustment() { |
| 1449 | return this._container.layout_manager.stateAdjustment; |
nothing calls this directly
no test coverage detected