gpm: add a gpmMouse option for setMouse.
This commit is contained in:
parent
87a3d2f288
commit
f13f1242b2
|
@ -633,7 +633,7 @@ Program.prototype._bindMouse = function(s, buf) {
|
|||
}
|
||||
};
|
||||
|
||||
/* gpm support for linux vc */
|
||||
// gpm support for linux vc
|
||||
Program.prototype.enableGpm = function() {
|
||||
var self = this;
|
||||
var gpmclient = require('./gpmclient')
|
||||
|
@ -2797,7 +2797,7 @@ Program.prototype.enableMouse = function() {
|
|||
options.x10Mouse = v;
|
||||
break;
|
||||
case 'GPMMOUSE':
|
||||
this.enableGpm();
|
||||
options.gpmMouse = v;
|
||||
break;
|
||||
case 'CELLMOTION':
|
||||
options.cellMotion = v;
|
||||
|
@ -2839,9 +2839,9 @@ Program.prototype.enableMouse = function() {
|
|||
}
|
||||
|
||||
if (this.term('linux')) {
|
||||
this.enableGpm();
|
||||
return this.setMouse({
|
||||
vt200Mouse: true
|
||||
vt200Mouse: true,
|
||||
gpmMouse: true
|
||||
}, true);
|
||||
}
|
||||
|
||||
|
@ -2865,7 +2865,6 @@ Program.prototype.disableMouse = function() {
|
|||
obj[key] = false;
|
||||
});
|
||||
|
||||
this.disableGpm();
|
||||
return this.setMouse(obj, false);
|
||||
};
|
||||
|
||||
|
@ -2962,6 +2961,12 @@ Program.prototype.setMouse = function(opt, enable) {
|
|||
if (opt.urxvtMouse) this.setMode('?1015');
|
||||
else this.resetMode('?1015');
|
||||
}
|
||||
|
||||
// gpm mouse
|
||||
if (opt.gpmMouse != null) {
|
||||
if (opt.gpmMouse) this.enableGpm();
|
||||
else this.disableGpm();
|
||||
}
|
||||
};
|
||||
|
||||
// CSI Ps ; Ps r
|
||||
|
|
Loading…
Reference in New Issue