feat: fix format of LeaveNotify event

This commit is contained in:
Tim Roes 2015-01-03 21:33:06 +01:00
parent 7351c47bc8
commit ff73173cd5

View file

@ -275,8 +275,8 @@ XClient.prototype.unpackEvent = function(type, seq, extra, code, raw, headerBuf)
event.y = values[6];
event.buttons = values[7];
event.sameScreen = values[8];
} else if (type == 7) { //EnterNotify
event.name = 'EnterNotify'
} else if (type == 7 || type == 8) { //EnterNotify || LeaveNotify
event.name = type === 7 ? 'EnterNotify' : 'LeaveNotify';
var values = raw.unpack('LLLssssSC');
event.root = values[0]
event.wid = values[1]