Mon 21 Jul 22:43:21 CEST 2025
This commit is contained in:
parent
5b8cec8b31
commit
1e683e2047
15
js/x11/examples/simple/resizewindow.js
Normal file
15
js/x11/examples/simple/resizewindow.js
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
var x11 = require('../../lib');
|
||||||
|
x11.createClient(function(err, display) {
|
||||||
|
var X = display.client;
|
||||||
|
var root = display.screen[0].root;
|
||||||
|
var wid = X.AllocID();
|
||||||
|
X.CreateWindow(wid, root, 10, 10, 400, 300);
|
||||||
|
X.MapWindow(wid);
|
||||||
|
setInterval( function() {
|
||||||
|
X.ResizeWindow(wid, 800, 200);
|
||||||
|
}, 1200);
|
||||||
|
var interval = setInterval( function() {
|
||||||
|
X.ResizeWindow(wid, 400, 300);
|
||||||
|
}, 510);
|
||||||
|
X.on('end', function() { clearInterval(interval)});
|
||||||
|
});
|
Loading…
Reference in New Issue
Block a user