Merge pull request #76 from timroes/leaveNotify

feat: fix format of LeaveNotify event
This commit is contained in:
Andrey Sidorov 2015-01-04 08:30:53 +11:00
commit 1d9c7f2f4b

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]