var x11 = require('../lib/x11'); var xclient = x11.createClient(); var PointerMotion = x11.eventMask.PointerMotion; var mapped = true; xclient.on('connect', function(display) { var X = this; var root = display.screen[0].root; var white = display.screen[0].white_pixel; var black = display.screen[0].black_pixel; var wid = X.AllocID(); X.CreateWindow(wid, root, 10, 10, 400, 300, 1, 1, 0, { backgroundPixel: white, eventMask: PointerMotion }); var cid = X.AllocID(); X.CreateGC(cid, wid); });