mirror of
https://github.com/danbulant/node-x11
synced 2026-05-24 12:35:39 +00:00
whitepixel/blackpixel
This commit is contained in:
parent
53dc53582e
commit
1d89819e2f
1 changed files with 12 additions and 10 deletions
|
|
@ -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) {
|
||||||
//mainwnd.on('mousemove', function(ev) {
|
ch.unmap();
|
||||||
// console.log(ev.x, ev.y);
|
setTimeout( function() { ch.map() }, 500);
|
||||||
//});
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue