whitepixel/blackpixel

This commit is contained in:
sidorares 2011-07-15 10:23:40 +10:00
parent 53dc53582e
commit 1d89819e2f

View file

@ -6,16 +6,18 @@ var height = 500;
var xclient = x11.createClient(); var xclient = x11.createClient();
xclient.on('connect', function(display) { xclient.on('connect', function(display) {
console.log(xclient.display.white_pixel); var white = xclient.display.screen[0].white_pixel;
var mainwnd = new Window(xclient, 0, 0, width, height, xclient.display.white_pixel); var black = xclient.display.screen[0].black_pixel;
/*
for (var x = 0; x < width; x += 10) { var mainwnd = new Window(xclient, 0, 0, width, height, black);
for (var y = 0; y < width; y += 10) { for (var x = 0; x < width; x += 20) {
var ch = new Window(mainwnd, x, y, 10, 10, 0); for (var y = 0; y < width; y += 20) {
// TODO: wnd.createChild() ?
var ch = new Window(xclient, x + 1, y + 1, 18, 18, 0, white);
ch.on('mousemove', function(ev) {
ch.unmap();
setTimeout( function() { ch.map() }, 500);
});
} }
} }
*/
//mainwnd.on('mousemove', function(ev) {
// console.log(ev.x, ev.y);
//});
}); });