SelectionRequest and SelectionNotify events

This commit is contained in:
Andrey Sidorov 2012-06-11 23:59:09 +10:00
parent 5315432ce4
commit de99f7ec14

View file

@ -242,13 +242,29 @@ XClient.prototype.unpackEvent = function(type, seq, extra, code, raw)
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];
} else if (type == 30) {// SelectionRequest
event.name = 'SelectionRequest';
event.time = extra;
var values = raw.unpack('LLLLL');
event.owner = raw[0];
event.requestor = raw[1];
event.selection = raw[2];
event.target = raw[3];
event.property = raw[4];
} else if (type == 31) {// SelectionNotify
event.name = 'SelectionNotify';
event.time = extra;
var values = raw.unpack('LLLL');
event.requestor = raw[0];
event.selection = raw[1];
event.target = raw[2];
event.property = raw[3];
}
return event;
}