       element = projectRoots.eq(newDropTargetIndex - 1).addClass 'drop-target-is-after'
       @getPlaceholder().insertAfter(element)
 
-  onDropOnOtherWindow: (fromItemIndex) =>
+  onDropOnOtherWindow: (event, fromItemIndex) =>
     paths = atom.project.getPaths()
     paths.splice(fromItemIndex, 1)
     atom.project.setPaths(paths)

  constructor: (@treeView) ->
    @treeView.on 'dragend', '.project-root-header', @onDragEnd

    RendererIpc.on('tree-view:project-folder-dropped', @onDropOnOtherWindow)

  # unused
  unsubscribe: ->
    RendererIpc.removeListener('tree-view:project-folder-dropped', @onDropOnOtherWindow)

  onDragStart: (event) =>
    event.originalEvent.dataTransfer.setData 'atom-event', 'true'

BrowserWindow = null # Defer require until actually used
{ipcRenderer} = require 'electron'

{$, View} = require 'atom-space-pen-views'
_ = require 'underscore-plus'
