From f5303b0ad9375c17f2016ca08b9cbfe0c27fb987 Mon Sep 17 00:00:00 2001 From: Andrey Sidorov Date: Mon, 11 Jun 2012 17:05:23 +1000 Subject: [PATCH] PropertyNotify and SelectionClear unpackers --- lib/x11/xcore.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/x11/xcore.js b/lib/x11/xcore.js index 40468f6..302fb60 100644 --- a/lib/x11/xcore.js +++ b/lib/x11/xcore.js @@ -235,6 +235,20 @@ XClient.prototype.unpackEvent = function(type, seq, extra, code, raw) event.mask = values[6]; // 322, [ 12582925, 0, 0, 484, 316, 1, 12, 0 //console.log([extra, code, values]); + } else if (type == 28) {// PropertyNotify + event.name = 'PropertyNotify'; + var values = raw.unpack('LLC'); + event.window = extra; + event.atom = values[0]; + event.time = values[1]; + event.state = values[2]; + + } else if (type == 29) {// SelectionClear + event.name = 'SelectionClear'; + event.time = extra; + var values = raw.unpack('LL'); + event.owner = values[0]; + event.selection = values[1]; } return event; }