Reads nessage_type from ClientMessage.

See: https://tronche.com/gui/x/xlib/events/client-communication/client-message.html
This commit is contained in:
plehmkuhl 2016-02-02 16:26:41 +01:00
parent f21cdb187b
commit 27c70c7315

View file

@ -404,6 +404,7 @@ XClient.prototype.unpackEvent = function(type, seq, extra, code, raw, headerBuf)
event.name = 'ClientMessage';
event.format = code;
event.wid = extra;
event.message_type = raw.unpack('L');
var format = (code === 32) ? 'LLLLL' : (code === 16) ? 'SSSSSSSSSS' : 'CCCCCCCCCCCCCCCCCCCC';
event.data = raw.unpack(format, 4);
} else if (type == 34) {