mirror of
https://github.com/danbulant/node-x11
synced 2026-06-24 17:21:47 +00:00
use wid instead of window for consistency
This commit is contained in:
parent
cb3cfa91eb
commit
6643bd97f7
2 changed files with 8 additions and 4 deletions
|
|
@ -334,6 +334,7 @@ XClient.prototype.unpackEvent = function(type, seq, extra, code, raw, headerBuf)
|
||||||
var values = raw.unpack('LLssSSSC');
|
var values = raw.unpack('LLssSSSC');
|
||||||
event.name = 'ConfigureNotify';
|
event.name = 'ConfigureNotify';
|
||||||
event.wid = extra;
|
event.wid = extra;
|
||||||
|
// TODO rename
|
||||||
event.wid1 = values[0];
|
event.wid1 = values[0];
|
||||||
event.aboveSibling = values[1];
|
event.aboveSibling = values[1];
|
||||||
event.x = values[2];
|
event.x = values[2];
|
||||||
|
|
@ -364,7 +365,7 @@ XClient.prototype.unpackEvent = function(type, seq, extra, code, raw, headerBuf)
|
||||||
} else if (type == 28) {// PropertyNotify
|
} else if (type == 28) {// PropertyNotify
|
||||||
event.name = 'PropertyNotify';
|
event.name = 'PropertyNotify';
|
||||||
var values = raw.unpack('LLC');
|
var values = raw.unpack('LLC');
|
||||||
event.window = extra;
|
event.wid = extra;
|
||||||
event.atom = values[0];
|
event.atom = values[0];
|
||||||
event.time = values[1];
|
event.time = values[1];
|
||||||
event.state = values[2];
|
event.state = values[2];
|
||||||
|
|
@ -376,6 +377,7 @@ XClient.prototype.unpackEvent = function(type, seq, extra, code, raw, headerBuf)
|
||||||
event.selection = values[1];
|
event.selection = values[1];
|
||||||
} else if (type == 30) {// SelectionRequest
|
} else if (type == 30) {// SelectionRequest
|
||||||
event.name = 'SelectionRequest';
|
event.name = 'SelectionRequest';
|
||||||
|
// TODO check this
|
||||||
event.time = extra;
|
event.time = extra;
|
||||||
var values = raw.unpack('LLLLL');
|
var values = raw.unpack('LLLLL');
|
||||||
event.owner = values[0];
|
event.owner = values[0];
|
||||||
|
|
@ -385,6 +387,7 @@ XClient.prototype.unpackEvent = function(type, seq, extra, code, raw, headerBuf)
|
||||||
event.property = values[4];
|
event.property = values[4];
|
||||||
} else if (type == 31) {// SelectionNotify
|
} else if (type == 31) {// SelectionNotify
|
||||||
event.name = 'SelectionNotify';
|
event.name = 'SelectionNotify';
|
||||||
|
// TODO check this
|
||||||
event.time = extra;
|
event.time = extra;
|
||||||
var values = raw.unpack('LLLL');
|
var values = raw.unpack('LLLL');
|
||||||
event.requestor = values[0];
|
event.requestor = values[0];
|
||||||
|
|
@ -403,6 +406,7 @@ XClient.prototype.unpackEvent = function(type, seq, extra, code, raw, headerBuf)
|
||||||
event.request = headerBuf[4];
|
event.request = headerBuf[4];
|
||||||
event.firstKeyCode = headerBuf[5];
|
event.firstKeyCode = headerBuf[5];
|
||||||
event.count = headerBuf[6];
|
event.count = headerBuf[6];
|
||||||
|
// TODO cleanup
|
||||||
console.log(values);
|
console.log(values);
|
||||||
console.log(raw);
|
console.log(raw);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ describe('ChangeProperty', function() {
|
||||||
self.X.once('event', function(ev) {
|
self.X.once('event', function(ev) {
|
||||||
ev.type.should.equal(28);
|
ev.type.should.equal(28);
|
||||||
ev.atom.should.equal(atom);
|
ev.atom.should.equal(atom);
|
||||||
ev.window.should.equal(self.wid);
|
ev.wid.should.equal(self.wid);
|
||||||
self.X.GetProperty(0, self.wid, atom, self.X.atoms.WINDOW, 0, 1000000000, function(err, prop) {
|
self.X.GetProperty(0, self.wid, atom, self.X.atoms.WINDOW, 0, 1000000000, function(err, prop) {
|
||||||
should.not.exist(err);
|
should.not.exist(err);
|
||||||
prop.data.readUInt32LE(0).should.equal(self.wid);
|
prop.data.readUInt32LE(0).should.equal(self.wid);
|
||||||
|
|
@ -54,7 +54,7 @@ describe('ChangeProperty', function() {
|
||||||
self.X.once('event', function(ev) {
|
self.X.once('event', function(ev) {
|
||||||
ev.type.should.equal(28);
|
ev.type.should.equal(28);
|
||||||
ev.atom.should.equal(atom);
|
ev.atom.should.equal(atom);
|
||||||
ev.window.should.equal(self.wid);
|
ev.wid.should.equal(self.wid);
|
||||||
self.X.GetProperty(0, self.wid, atom, self.X.atoms.ATOM, 0, 1000000000, function(err, prop) {
|
self.X.GetProperty(0, self.wid, atom, self.X.atoms.ATOM, 0, 1000000000, function(err, prop) {
|
||||||
should.not.exist(err);
|
should.not.exist(err);
|
||||||
prop.data.readUInt32LE(0).should.equal(self.wid);
|
prop.data.readUInt32LE(0).should.equal(self.wid);
|
||||||
|
|
@ -74,7 +74,7 @@ describe('ChangeProperty', function() {
|
||||||
self.X.once('event', function(ev) {
|
self.X.once('event', function(ev) {
|
||||||
ev.type.should.equal(28);
|
ev.type.should.equal(28);
|
||||||
ev.atom.should.equal(atom);
|
ev.atom.should.equal(atom);
|
||||||
ev.window.should.equal(self.wid);
|
ev.wid.should.equal(self.wid);
|
||||||
self.X.GetProperty(0, self.wid, atom, self.X.atoms.WINDOW, 0, 1000000000, function(err, prop) {
|
self.X.GetProperty(0, self.wid, atom, self.X.atoms.WINDOW, 0, 1000000000, function(err, prop) {
|
||||||
should.not.exist(err);
|
should.not.exist(err);
|
||||||
prop.data.length.should.equal(0);
|
prop.data.length.should.equal(0);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue