mirror of
https://github.com/danbulant/node-x11
synced 2026-06-24 17:21:47 +00:00
Fix the parsing of the type field in Event msgs
- According to the standard, the most significant bit of the 8-bit type code is used to flag if the event was generated from a SendEvent request. See Event Format section in Chapter 1 of the specification.
This commit is contained in:
parent
2e4e3afeca
commit
1ad9c385b5
1 changed files with 3 additions and 1 deletions
|
|
@ -235,7 +235,9 @@ XClient.prototype.AllocID = function()
|
||||||
XClient.prototype.unpackEvent = function(type, seq, extra, code, raw)
|
XClient.prototype.unpackEvent = function(type, seq, extra, code, raw)
|
||||||
{
|
{
|
||||||
var event = {}; // TODO: constructor & base functions
|
var event = {}; // TODO: constructor & base functions
|
||||||
event.type = type;
|
// Remove the most significant bit. See Chapter 1, Event Format section in X11 protocol
|
||||||
|
// specification
|
||||||
|
event.type = type && 0x7F;
|
||||||
event.seq = seq;
|
event.seq = seq;
|
||||||
|
|
||||||
var extUnpacker = this.eventParsers[type];
|
var extUnpacker = this.eventParsers[type];
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue