mirror of
https://github.com/danbulant/node-x11
synced 2026-05-20 04:48:56 +00:00
17 lines
No EOL
523 B
JavaScript
17 lines
No EOL
523 B
JavaScript
var x11 = require('../lib/x11');
|
|
|
|
var xclient = x11.createClient();
|
|
|
|
xclient.on('connect', function(display) {
|
|
var X = this;
|
|
var root = display.screen[0].root;
|
|
var wid = X.AllocID();
|
|
|
|
X.CreateWindow(wid, root, 10, 10, 400, 300, 1, 1, 0, { backgroundPixel: 0, eventMask: 0x00000040 });
|
|
X.MapWindow(wid);
|
|
|
|
var wid1 = X.AllocID();
|
|
X.CreateWindow(wid1, root, 10, 10, 40, 30, 1, 1, 0, { backgroundPixel: xclient.display.screen[0].white_pixel, eventMask: 0x00000040 });
|
|
X.MapWindow(wid1);
|
|
|
|
}); |