WarpPointer request

This commit is contained in:
sidorares 2011-09-07 13:06:09 +10:00
parent a40ba7d874
commit 5e999c3446
2 changed files with 17 additions and 0 deletions

View file

@ -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
View 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);
});