mirror of
https://github.com/danbulant/node-x11
synced 2026-05-27 05:52:02 +00:00
hash instead of array in GetWindowAttributes result
This commit is contained in:
parent
3f1b8e5442
commit
07cbcea4d7
1 changed files with 12 additions and 3 deletions
|
|
@ -190,11 +190,20 @@ module.exports = {
|
||||||
|
|
||||||
GetWindowAttributes: [
|
GetWindowAttributes: [
|
||||||
['CxSL', [3, 2]],
|
['CxSL', [3, 2]],
|
||||||
function(buf)
|
function(buf, backingStore)
|
||||||
{
|
{
|
||||||
// TODO: change from array to named object fields
|
// TODO: change from array to named object fields
|
||||||
var res = buf.unpack('LSCCLLCCCCCLLLS');
|
var res = buf.unpack('LSCCLLCCCCLLLS');
|
||||||
return res;
|
var ret = {
|
||||||
|
backingStore: backingStore
|
||||||
|
};
|
||||||
|
( "visual klass bitGravity winGravity backingPlanes backingPixel" +
|
||||||
|
" saveUnder mapIsInstalled mapState overrideRedirect colormap" +
|
||||||
|
" allEventMasks myEventMasks doNotPropogateMask" )
|
||||||
|
.split(' ').forEach(function(field, index) {
|
||||||
|
ret[field] = res[index];
|
||||||
|
});
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue