update callback to accept error as first parameter

This commit is contained in:
Andrey Sidorov 2015-10-23 09:56:16 +11:00
parent 71599b100f
commit 51b03c5173

View file

@ -11,7 +11,7 @@ x11.createClient(function(err, display) {
X.CreateGC(gc, id); X.CreateGC(gc, id);
var width = 0; var width = 0;
var hwight = 0; var hwight = 0;
X.GetGeometry(id, function(clientGeom) { X.GetGeometry(id, function(err, clientGeom) {
width = clientGeom.width; width = clientGeom.width;
height = clientGeom.height; height = clientGeom.height;
@ -35,10 +35,10 @@ x11.createClient(function(err, display) {
if (win == dispwin) if (win == dispwin)
return drawWithKids(list, cb); return drawWithKids(list, cb);
X.GetWindowAttributes(win, function(res) { X.GetWindowAttributes(win, function(err, res) {
if (res[8] == 0) if (res[8] == 0)
return drawWithKids(list, cb); return drawWithKids(list, cb);
X.GetGeometry(win, function(geom) { X.GetGeometry(win, function(err, geom) {
// (srcDrawable, dstDrawable, gc, srcX, srcY, dstX, dstY, width, height) // (srcDrawable, dstDrawable, gc, srcX, srcY, dstX, dstY, width, height)
if (win != root) if (win != root)
X.CopyArea(win, dispwin, gc, 0, 0, p.x + geom.xPos, p.y + geom.yPos, geom.width, geom.height); X.CopyArea(win, dispwin, gc, 0, 0, p.x + geom.xPos, p.y + geom.yPos, geom.width, geom.height);