mirror of
https://github.com/danbulant/node-x11
synced 2026-05-24 12:35:39 +00:00
Merge pull request #150 from jdomenechb/shapenotify
Added ShapeNotify event parsing
This commit is contained in:
commit
a97f7a179d
1 changed files with 26 additions and 0 deletions
|
|
@ -112,5 +112,31 @@ exports.requireExt = function(display, callback)
|
||||||
callback(null, ext);
|
callback(null, ext);
|
||||||
});
|
});
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
ext.events = {
|
||||||
|
ShapeNotify: 0
|
||||||
|
}
|
||||||
|
|
||||||
|
X.eventParsers[ext.firstEvent + ext.events.ShapeNotify] = function(type, seq, extra, code, raw)
|
||||||
|
{
|
||||||
|
var event = {};
|
||||||
|
event.type = type;
|
||||||
|
event.kind = code;
|
||||||
|
event.seq = seq;
|
||||||
|
|
||||||
|
event.window = extra;
|
||||||
|
|
||||||
|
var values = raw.unpack('ssSSLC');
|
||||||
|
|
||||||
|
event.x = values[0];
|
||||||
|
event.y = values[1];
|
||||||
|
event.width = values[2];
|
||||||
|
event.height = values[3];
|
||||||
|
event.time = values[4];
|
||||||
|
event.shaped = values[5];
|
||||||
|
event.name = 'ShapeNotify';
|
||||||
|
|
||||||
|
return event;
|
||||||
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue