From 54e39c9779308643d77a14c16613d3ce478bad06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Sat, 27 Sep 2014 13:28:00 +0200 Subject: [PATCH] launch-new-instance: Re-use original activate function Rather than re-implementing the function (and risk missing improvements like the launch animation), call the original one as if the user had middle-clicked the launcher. --- extensions/launch-new-instance/extension.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/extensions/launch-new-instance/extension.js b/extensions/launch-new-instance/extension.js index 7e34f31e..fd970649 100644 --- a/extensions/launch-new-instance/extension.js +++ b/extensions/launch-new-instance/extension.js @@ -2,18 +2,14 @@ const AppDisplay = imports.ui.appDisplay; var _onActivateOriginal = null; -function _activate(button) { - this.animateLaunch(); - this.app.open_new_window(-1); - Main.overview.hide(); -} - function init() { } function enable() { _activateOriginal = AppDisplay.AppIcon.prototype.activate; - AppDisplay.AppIcon.prototype.activate = _activate; + AppDisplay.AppIcon.prototype.activate = function() { + _activateOriginal.call(this, 2); + }; } function disable() {