mirror of
https://github.com/danbulant/node-x11
synced 2026-07-06 19:50:58 +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
|
||||
function(id, parentId, x, y, width, height, borderWidth, depth, _class, visual, values) {
|
||||
|
||||
console.log(values);
|
||||
|
||||
if (borderWidth === undefined)
|
||||
borderWidth = 0;
|
||||
if (depth === undefined)
|
||||
|
|
@ -386,9 +388,16 @@ module.exports = {
|
|||
QueryPointer: [
|
||||
[ 'CxSL', [38, 2] ],
|
||||
function(buf) {
|
||||
var res = buf.unpack('LLSSSSS'); // TODO: should be unsigned
|
||||
// TODO pack array into named fields
|
||||
return res;
|
||||
var res = buf.unpack('LLssssS');
|
||||
return {
|
||||
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