Update DestroyNotify and MapNotify handling

- To be better aligned with the spec.
This commit is contained in:
Santiago Gimeno 2013-11-05 10:22:26 +01:00
parent 85773377e9
commit 90148d64a8

View file

@ -298,8 +298,8 @@ XClient.prototype.unpackEvent = function(type, seq, extra, code, raw)
} else if (type == 17) { // destroy notify } else if (type == 17) { // destroy notify
var values = raw.unpack('LL'); var values = raw.unpack('LL');
event.name = 'DestroyNotify' event.name = 'DestroyNotify'
event.wid = extra; event.event = extra;
event.wid1 = values[0]; event.wid = values[0];
} else if (type == 18) { // UnmapNotify } else if (type == 18) { // UnmapNotify
var values = raw.unpack('LLC'); var values = raw.unpack('LLC');
event.name = 'UnmapNotify' event.name = 'UnmapNotify'
@ -309,8 +309,9 @@ XClient.prototype.unpackEvent = function(type, seq, extra, code, raw)
} else if (type == 19) { // MapNotify } else if (type == 19) { // MapNotify
var values = raw.unpack('LLC'); var values = raw.unpack('LLC');
event.name = 'MapNotify' event.name = 'MapNotify'
event.wid = extra; event.event = extra;
event.wid1 = values[0]; event.wid = values[0];
event.overrideRedirect = values[1] ? true : false;
} else if (type == 20) { } else if (type == 20) {
var values = raw.unpack('LL'); var values = raw.unpack('LL');
event.name = 'MapRequest' event.name = 'MapRequest'