Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Bugfix: _init being called 2x, thanks to Ingenious

  • Loading branch information...
commit 9ae55836afc917426679678b99adae3ca88b89ef 1 parent 7a7bbc7
@Smotko authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 extension.js
View
6 extension.js
@@ -60,9 +60,11 @@ function enable() {
workViewInjections['_wn_onKeyPress'] = undefined;
workViewInjections['_init'] = injectToFunction(WorkspacesView.WorkspacesView.prototype, '_init', function(width, height, x, y, workspaces) {
- _keyPressEventId = global.stage.connect('key-press-event', Lang.bind(this, this._wn_onKeyPress));
+ if(connectedSignals.length == 0) {
+ _keyPressEventId = global.stage.connect('key-press-event', Lang.bind(this, this._wn_onKeyPress));
- connectedSignals.push({ obj: global.stage, id: _keyPressEventId });
+ connectedSignals.push({ obj: global.stage, id: _keyPressEventId });
+ }
});
workViewInjections['_onDestroy'] = injectToFunction(WorkspacesView.WorkspacesView.prototype, '_onDestroy', function() {
Please sign in to comment.
Something went wrong with that request. Please try again.