[appDisplay] Always relaunch application on drag and drop

Rather than just launching if we weren't already running, always
relaunch, which happens to make Firefox, etc. work.  See
the comment in the commit for more explanation.
This commit is contained in:
Colin Walters 2009-08-20 20:03:28 -04:00
parent 9dff05a394
commit 7465338ea1

View File

@ -540,12 +540,15 @@ WellDisplayItem.prototype = {
}, },
shellWorkspaceLaunch : function() { shellWorkspaceLaunch : function() {
if (this._windows.length == 0) { // Here we just always launch the application again, even if we know
this.appInfo.launch(); // it was already running. For most applications this
} else { // should have the effect of creating a new window, whether that's
// We should open a new window for the app here, once we know // a second process (in the case of Calculator) or IPC to existing
// how to do that. // instance (Firefox). There are a few less-sensical cases such
} // as say Pidgin, but ideally what we do there is have the app
// express to us that it doesn't do relaunch=new-window in the
// .desktop file.
this.appInfo.launch();
}, },
getDragActor: function(stageX, stageY) { getDragActor: function(stageX, stageY) {