diff --git a/lib/program.js b/lib/program.js index b767f2a..b7a9d86 100644 --- a/lib/program.js +++ b/lib/program.js @@ -275,6 +275,8 @@ Program.prototype._bindMouse = function(s) { if (key.x === -32) key.x = 255; if (key.y === -32) key.y = 255; + if (this.zero) key.x--, key.y--; + mod = b >> 3; key.shift = mod & 4; key.meta = mod & 8; @@ -333,6 +335,8 @@ Program.prototype._bindMouse = function(s) { key.x = x; key.y = y; + if (this.zero) key.x--, key.y--; + // NOTE: Duplicate of the above. mod = b >> 3; key.shift = mod & 4; @@ -393,6 +397,8 @@ Program.prototype._bindMouse = function(s) { key.x = x; key.y = y; + if (this.zero) key.x--, key.y--; + b &= 3; // NOTE: Get mod. And wheel. @@ -428,6 +434,8 @@ Program.prototype._bindMouse = function(s) { key.x = x; key.y = y; + if (this.zero) key.x--, key.y--; + key.action = b === 3 ? 'mouseup' : 'mousedown'; @@ -456,6 +464,8 @@ Program.prototype._bindMouse = function(s) { key.x = x; key.y = y; + if (this.zero) key.x--, key.y--; + key.action = 'mousedown'; key.button = b === 1 ? 'left' diff --git a/lib/widget.js b/lib/widget.js index 5160f62..a0994eb 100644 --- a/lib/widget.js +++ b/lib/widget.js @@ -1053,6 +1053,7 @@ Screen.prototype.setEffects = function(el, fel, over, out, effects, temp) { if (typeof val === 'string') { effects[key] = val; } else if (val && typeof val === 'object' && !Array.isArray(val)) { + // TODO: Remove this now that colors are handled lazily. Object.keys(effects[key]).forEach(function(k) { var v = effects[key][k]; effects[key][k] = v;