diff --git a/lib/xcore.js b/lib/xcore.js index 17a4480..bca6a73 100644 --- a/lib/xcore.js +++ b/lib/xcore.js @@ -378,6 +378,13 @@ XClient.prototype.unpackEvent = function(type, seq, extra, code, raw) event.selection = values[1]; event.target = values[2]; event.property = values[3]; + } else if (type == 33) {// ClientMessage + event.name = 'ClientMessage'; + event.format = code; + event.wid = extra; + event.type = raw.readUInt32LE(0); + var format = (code === 32) ? 'LLLLL' : (code === 16) ? 'SSSSSSSSSS' : 'CCCCCCCCCCCCCCCCCCCC'; + event.data = raw.unpack(format, 4); } return event; }