From 53dc53582ef9e0d2643bb9bd4ae6d3462ebaed87 Mon Sep 17 00:00:00 2001 From: Andrey Sidorov Date: Fri, 15 Jul 2011 09:52:32 +1000 Subject: [PATCH] test wrapper, events, stress test - create grid of windows --- test/testwnd.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 test/testwnd.js diff --git a/test/testwnd.js b/test/testwnd.js new file mode 100644 index 0000000..051bfac --- /dev/null +++ b/test/testwnd.js @@ -0,0 +1,21 @@ +var x11 = require('../lib/x11'); +var Window = require('./wndwrap'); + +var width = 700; +var height = 500; + +var xclient = x11.createClient(); +xclient.on('connect', function(display) { + console.log(xclient.display.white_pixel); + var mainwnd = new Window(xclient, 0, 0, width, height, xclient.display.white_pixel); + /* + for (var x = 0; x < width; x += 10) { + for (var y = 0; y < width; y += 10) { + var ch = new Window(mainwnd, x, y, 10, 10, 0); + } + } + */ + //mainwnd.on('mousemove', function(ev) { + // console.log(ev.x, ev.y); + //}); +});