mirror of
https://github.com/danbulant/node-x11
synced 2026-05-19 12:28:58 +00:00
Added ShapeNotify event parsing
This commit is contained in:
parent
18cbbdf6ee
commit
bc9dceebd4
1 changed files with 26 additions and 0 deletions
|
|
@ -112,5 +112,31 @@ exports.requireExt = function(display, callback)
|
|||
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