mirror of
https://github.com/danbulant/node-x11
synced 2026-05-21 21:39:13 +00:00
fix for PolyPoint/PolyLine requests (incorrect length)
This commit is contained in:
parent
a1d1bb6e42
commit
1b5eb9145f
2 changed files with 6 additions and 5 deletions
|
|
@ -201,6 +201,7 @@ module.exports = {
|
|||
}
|
||||
],
|
||||
|
||||
// TODO: test
|
||||
DeleteProperty: [
|
||||
[ 'CxLLL', [19, 3] ] // wid, propNameAtom
|
||||
],
|
||||
|
|
@ -254,7 +255,7 @@ module.exports = {
|
|||
function(coordMode, drawable, gc, points)
|
||||
{
|
||||
var format = 'CCSLL';
|
||||
var args = [64, coordMode, 3+points.length, drawable, gc];
|
||||
var args = [64, coordMode, 3+points.length/2, drawable, gc];
|
||||
for (var i=0; i < points.length; ++i)
|
||||
{
|
||||
format += 'S';
|
||||
|
|
@ -269,7 +270,7 @@ module.exports = {
|
|||
function(coordMode, drawable, gc, points)
|
||||
{
|
||||
var format = 'CCSLL';
|
||||
var args = [65, coordMode, 3+points.length, drawable, gc];
|
||||
var args = [65, coordMode, 3+points.length/2, drawable, gc];
|
||||
for (var i=0; i < points.length; ++i)
|
||||
{
|
||||
format += 'S';
|
||||
|
|
|
|||
|
|
@ -28,10 +28,10 @@ xclient.on('connect', function(display) {
|
|||
X.on('event', function(ev) {
|
||||
if (ev.type == 12)
|
||||
{
|
||||
X.PolyPoint(0, wid, gc, pts);
|
||||
//X.PolyPoint(0, wid, gc, pts);
|
||||
} else if (ev.type == 6) {
|
||||
pts.push(ev.x);
|
||||
pts.push(ev.y);
|
||||
//pts.push(ev.x);
|
||||
//pts.push(ev.y);
|
||||
X.PolyPoint(0, wid, gc, [ev.x, ev.y]);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue