mirror of
https://github.com/danbulant/node-x11
synced 2026-07-04 02:30:44 +00:00
fixes for err in callback; terminate om end
This commit is contained in:
parent
cc5f53ae45
commit
779da87017
1 changed files with 5 additions and 7 deletions
|
|
@ -1,13 +1,11 @@
|
||||||
var x11 = require('../lib/x11');
|
var x11 = require('../lib/x11');
|
||||||
|
x11.createClient(function(display) {
|
||||||
var xclient = x11.createClient();
|
var X = display.client;
|
||||||
|
|
||||||
xclient.on('connect', function(display) {
|
|
||||||
var X = this;
|
|
||||||
var hello = 'Hello, node.js';
|
var hello = 'Hello, node.js';
|
||||||
X.InternAtom(false, hello, function(atomId) {
|
X.InternAtom(false, hello, function(err, atomId) {
|
||||||
X.GetAtomName(atomId, function(str) {
|
X.GetAtomName(atomId, function(err, str) {
|
||||||
console.log('Value for atom ' + atomId + ' is \"' + str + '\"');
|
console.log('Value for atom ' + atomId + ' is \"' + str + '\"');
|
||||||
|
X.terminate();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue