hash instead of array in GetWindowAttributes result

This commit is contained in:
Andrey Sidorov 2013-02-26 11:25:53 +11:00
parent 3f1b8e5442
commit 07cbcea4d7

View file

@ -190,11 +190,20 @@ module.exports = {
GetWindowAttributes: [
['CxSL', [3, 2]],
function(buf)
function(buf, backingStore)
{
// TODO: change from array to named object fields
var res = buf.unpack('LSCCLLCCCCCLLLS');
return res;
var res = buf.unpack('LSCCLLCCCCLLLS');
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;
}
],