From 9ee3721dd2b6354409a3d4df682f45719ace8383 Mon Sep 17 00:00:00 2001 From: Santiago Gimeno Date: Wed, 22 May 2013 14:58:32 +0200 Subject: [PATCH] Really fix the parsing of the event type field - Typo: use the bitwise operator and not the comparison operator --- lib/xcore.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/xcore.js b/lib/xcore.js index 218c71d..e3031ee 100644 --- a/lib/xcore.js +++ b/lib/xcore.js @@ -237,7 +237,8 @@ XClient.prototype.unpackEvent = function(type, seq, extra, code, raw) var event = {}; // TODO: constructor & base functions // Remove the most significant bit. See Chapter 1, Event Format section in X11 protocol // specification - event.type = type && 0x7F; + type = type & 0x7F; + event.type = type; event.seq = seq; var extUnpacker = this.eventParsers[type];