mirror of
https://github.com/danbulant/node-x11
synced 2026-06-16 05:01:28 +00:00
WarpPointer request
This commit is contained in:
parent
a40ba7d874
commit
5e999c3446
2 changed files with 17 additions and 0 deletions
|
|
@ -241,6 +241,14 @@ module.exports = {
|
|||
}
|
||||
],
|
||||
|
||||
WarpPointer: [
|
||||
|
||||
function (srcWin, dstWin, srcX, srcY, srcWidth, srcHeight, dstX, dstY)
|
||||
{
|
||||
return [ 'CxSLLssSSss', [41, 6, srcWin, dstWin, srcX, srcY, srcWidth, srcHeight, dstX, dstY] ];
|
||||
}
|
||||
],
|
||||
|
||||
CreatePixmap: [
|
||||
function(pid, drawable, depth, width, height) {
|
||||
console.log(['CreatePixmap:', 'CCSLLSS', [53, depth, 4, pid, drawable, width, height]]);
|
||||
|
|
|
|||
9
test/warppointer.js
Normal file
9
test/warppointer.js
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
var angle = 0;
|
||||
var x11 = require('../lib/x11').createClient(function(display) {
|
||||
setInterval(function() {
|
||||
var x = 500 + 100*Math.cos(angle*100);
|
||||
var y = 500 + 100*Math.sin(angle*100);
|
||||
display.client.WarpPointer(0, display.screen[0].root, 0, 0, 0, 0, parseInt(x), parseInt(y));
|
||||
angle += 0.05;
|
||||
}, 100);
|
||||
});
|
||||
Loading…
Reference in a new issue