mirror of
https://github.com/danbulant/node-x11
synced 2026-06-24 17:21:47 +00:00
QueryPointer result unpacking
This commit is contained in:
parent
5b17a21eff
commit
a951aa26cb
1 changed files with 58 additions and 49 deletions
|
|
@ -117,6 +117,8 @@ module.exports = {
|
||||||
// create request packet - function OR format string
|
// create request packet - function OR format string
|
||||||
function(id, parentId, x, y, width, height, borderWidth, depth, _class, visual, values) {
|
function(id, parentId, x, y, width, height, borderWidth, depth, _class, visual, values) {
|
||||||
|
|
||||||
|
console.log(values);
|
||||||
|
|
||||||
if (borderWidth === undefined)
|
if (borderWidth === undefined)
|
||||||
borderWidth = 0;
|
borderWidth = 0;
|
||||||
if (depth === undefined)
|
if (depth === undefined)
|
||||||
|
|
@ -386,9 +388,16 @@ module.exports = {
|
||||||
QueryPointer: [
|
QueryPointer: [
|
||||||
[ 'CxSL', [38, 2] ],
|
[ 'CxSL', [38, 2] ],
|
||||||
function(buf) {
|
function(buf) {
|
||||||
var res = buf.unpack('LLSSSSS'); // TODO: should be unsigned
|
var res = buf.unpack('LLssssS');
|
||||||
// TODO pack array into named fields
|
return {
|
||||||
return res;
|
root: res[0],
|
||||||
|
child: res[1],
|
||||||
|
rootX: res[2],
|
||||||
|
rootY: res[3],
|
||||||
|
childX: res[4],
|
||||||
|
childY: res[5],
|
||||||
|
keyMask: res[6]
|
||||||
|
};
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue