Mon 21 Jul 22:43:21 CEST 2025
This commit is contained in:
parent
024f6e1a87
commit
e12d73cdfd
16
js/x11/examples/simple/xembed.js
Normal file
16
js/x11/examples/simple/xembed.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
var x11 = require('../../lib');
|
||||
x11.createClient(function(err, display) {
|
||||
var X = display.client;
|
||||
var wid = X.AllocID();
|
||||
X.CreateWindow(wid, display.screen[0].root, 100, 100, 400, 300, 0, 0, 0, 0, {eventMask: x11.eventMask.PointerMotion});
|
||||
X.MapWindow(wid);
|
||||
var wid1 = X.AllocID();
|
||||
X.CreateWindow(wid1, wid, 10, 10, 380, 280, 0, 0, 0, 0, {eventMask: x11.eventMask.PointerMotion, backgroundPixel: display.screen[0].black_pixel});
|
||||
X.MapWindow(wid1);
|
||||
X.on('error', function(err) { console.log(err) });
|
||||
//X.on('event', console.log);
|
||||
|
||||
var xterm = require('child_process').spawn('xterm', ['-into', wid1]);
|
||||
xterm.stderr.pipe(process.stderr);
|
||||
xterm.stdout.pipe(process.stdout);
|
||||
});
|
Loading…
Reference in New Issue
Block a user