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.
18 lines
364 B
JavaScript
18 lines
364 B
JavaScript
const AppDisplay = imports.ui.appDisplay;
|
|
|
|
var _onActivateOriginal = null;
|
|
|
|
function init() {
|
|
}
|
|
|
|
function enable() {
|
|
_activateOriginal = AppDisplay.AppIcon.prototype.activate;
|
|
AppDisplay.AppIcon.prototype.activate = function() {
|
|
_activateOriginal.call(this, 2);
|
|
};
|
|
}
|
|
|
|
function disable() {
|
|
AppDisplay.AppIcon.prototype.activate = _activateOriginal;
|
|
}
|