From 85773377e9e95146d926afee3d1c602063a6560e Mon Sep 17 00:00:00 2001 From: Santiago Gimeno Date: Tue, 5 Nov 2013 10:21:42 +0100 Subject: [PATCH 1/2] Handle UnmapNotify event --- lib/xcore.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/xcore.js b/lib/xcore.js index 1b25aa5..ee0a0cc 100644 --- a/lib/xcore.js +++ b/lib/xcore.js @@ -300,6 +300,12 @@ XClient.prototype.unpackEvent = function(type, seq, extra, code, raw) event.name = 'DestroyNotify' event.wid = extra; event.wid1 = values[0]; + } else if (type == 18) { // UnmapNotify + var values = raw.unpack('LLC'); + event.name = 'UnmapNotify' + event.event = extra; + event.wid = values[0]; + event.fromConfigure = values[1] ? true : false; } else if (type == 19) { // MapNotify var values = raw.unpack('LLC'); event.name = 'MapNotify' From 90148d64a8d65ba4afe067b4b2825d1ab742a747 Mon Sep 17 00:00:00 2001 From: Santiago Gimeno Date: Tue, 5 Nov 2013 10:22:26 +0100 Subject: [PATCH 2/2] Update DestroyNotify and MapNotify handling - To be better aligned with the spec. --- lib/xcore.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/xcore.js b/lib/xcore.js index ee0a0cc..17a4480 100644 --- a/lib/xcore.js +++ b/lib/xcore.js @@ -298,8 +298,8 @@ XClient.prototype.unpackEvent = function(type, seq, extra, code, raw) } else if (type == 17) { // destroy notify var values = raw.unpack('LL'); event.name = 'DestroyNotify' - event.wid = extra; - event.wid1 = values[0]; + event.event = extra; + event.wid = values[0]; } else if (type == 18) { // UnmapNotify var values = raw.unpack('LLC'); event.name = 'UnmapNotify' @@ -309,8 +309,9 @@ XClient.prototype.unpackEvent = function(type, seq, extra, code, raw) } else if (type == 19) { // MapNotify var values = raw.unpack('LLC'); event.name = 'MapNotify' - event.wid = extra; - event.wid1 = values[0]; + event.event = extra; + event.wid = values[0]; + event.overrideRedirect = values[1] ? true : false; } else if (type == 20) { var values = raw.unpack('LL'); event.name = 'MapRequest'