Merge pull request #33 from santigimeno/fix_responses

Fixes in some replies
This commit is contained in:
Andrey Sidorov 2013-07-16 14:50:05 -07:00
commit 74996feabf

View file

@ -468,7 +468,7 @@ module.exports = {
QueryPointer: [ QueryPointer: [
[ 'CxSL', [38, 2] ], [ 'CxSL', [38, 2] ],
function(buf) { function(buf, sameScreen) {
var res = buf.unpack('LLssssS'); var res = buf.unpack('LLssssS');
return { return {
root: res[0], root: res[0],
@ -477,7 +477,8 @@ module.exports = {
rootY: res[3], rootY: res[3],
childX: res[4], childX: res[4],
childY: res[5], childY: res[5],
keyMask: res[6] keyMask: res[6],
sameScreen : sameScreen
}; };
} }
], ],
@ -486,13 +487,14 @@ module.exports = {
function(srcWid, dstWid, srcX, srcY) { function(srcWid, dstWid, srcX, srcY) {
return [ 'CxSLLSS', [ 40, 4, srcWid, dstWid, srcX, srcY ] ]; return [ 'CxSLLSS', [ 40, 4, srcWid, dstWid, srcX, srcY ] ];
}, },
function(buf) function(buf, sameScreen)
{ {
var res = buf.unpack('Lss'); var res = buf.unpack('Lss');
var ext = {}; var ext = {};
ext.child = res[0]; ext.child = res[0];
ext.destX = res[1]; ext.destX = res[1];
ext.destY = res[2]; ext.destY = res[2];
ext.sameScreen = sameScreen;
return ext; return ext;
} }
], ],
@ -799,7 +801,7 @@ module.exports = {
function(drawable){ function(drawable){
return ['CxSL', [14, 2, drawable]] return ['CxSL', [14, 2, drawable]]
}, },
function(buff) function(buff, depth)
{ {
var res = buff.unpack('LssSSSx'); var res = buff.unpack('LssSSSx');
var ext = {}; var ext = {};
@ -809,6 +811,7 @@ module.exports = {
ext.width = res[3]; ext.width = res[3];
ext.height = res[4]; ext.height = res[4];
ext.borderWidth = res[5]; ext.borderWidth = res[5];
ext.depth = depth;
return ext; return ext;
} }
], ],