mirror of
https://github.com/danbulant/node-x11
synced 2026-06-16 13:11:11 +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 xclient = x11.createClient();
|
||||
|
||||
xclient.on('connect', function(display) {
|
||||
var X = this;
|
||||
x11.createClient(function(display) {
|
||||
var X = display.client;
|
||||
var hello = 'Hello, node.js';
|
||||
X.InternAtom(false, hello, function(atomId) {
|
||||
X.GetAtomName(atomId, function(str) {
|
||||
X.InternAtom(false, hello, function(err, atomId) {
|
||||
X.GetAtomName(atomId, function(err, str) {
|
||||
console.log('Value for atom ' + atomId + ' is \"' + str + '\"');
|
||||
X.terminate();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue