signed x,y in CreateWindow, value instead of array in ListProps

This commit is contained in:
Andrey Sidorov 2012-06-09 13:52:14 +10:00
parent 3aa441358e
commit 771330201b

View file

@ -129,8 +129,7 @@ module.exports = {
values = {}
var packetLength = 8 + (values ? Object.keys(values).length : 0);
// TODO: should be CCSLLssSSSSLL - x,y are signed
var format = 'CCSLLSSSSSSLL';
var format = 'CCSLLssSSSSLL';
// create bitmask
var bitmask = 0;
@ -324,13 +323,11 @@ module.exports = {
},
function(buf) {
console.log(buf);
var n = buf.unpack('S')[0];
console.log(n);
var i;
var atoms = [];
for(i=0; i < n; ++i) {
atoms.push(buf.unpack('L', 24+4*i));
atoms.push(buf.unpack('L', 24+4*i)[0]);
//console.log([n, i, atoms]);
}
return atoms;