PropertyNotify and SelectionClear unpackers

This commit is contained in:
Andrey Sidorov 2012-06-11 17:05:23 +10:00
parent 06d87c5908
commit f5303b0ad9

View file

@ -235,6 +235,20 @@ XClient.prototype.unpackEvent = function(type, seq, extra, code, raw)
event.mask = values[6];
// 322, [ 12582925, 0, 0, 484, 316, 1, 12, 0
//console.log([extra, code, values]);
} else if (type == 28) {// PropertyNotify
event.name = 'PropertyNotify';
var values = raw.unpack('LLC');
event.window = extra;
event.atom = values[0];
event.time = values[1];
event.state = values[2];
} else if (type == 29) {// SelectionClear
event.name = 'SelectionClear';
event.time = extra;
var values = raw.unpack('LL');
event.owner = values[0];
event.selection = values[1];
}
return event;
}