alexmurray / remmina-search-provider

GNU General Public License v3.0
12 stars 9 forks source link

Drag’n’drop on workspaces #1

Closed Obsidien closed 12 years ago

Obsidien commented 12 years ago

Hi! I didn’t tried the extension, but (!) I think dragging the result on a workspace don’t launch Remmina on it, but on the active one. For this, something like that should help. Good luck!

dragActivateResult: function(id, params) {      // same as activateResult but for d’n’d, see searchDisplay.js:95
        params = Params.parse(params, { workspace: -1, timestamp: 0 })      // call on workspaceThumbnail.js:477
        let launchWorkspace = global.screen.get_workspace_by_index(params.workspace)
        launchWorkspace.activate(global.get_current_time())

        this.activateResult(id)

        Main.overview.hide()        // Overview auto-hide with activateResult() but not with dragActivateResult()
    },
alexmurray commented 12 years ago

Thanks for the suggestion - I've implemented it basically as you suggested in c989bc36a7ca871933a299148cf60a440a62168c with a couple cleanups and without automatically switching to it on the new workspace to work more inline with the way normal application launching works when dragging to a workspace.