mirror of
https://github.com/danbulant/node-x11
synced 2026-06-20 23:21:02 +00:00
update callback to accept error as first parameter
This commit is contained in:
parent
71599b100f
commit
51b03c5173
1 changed files with 10 additions and 10 deletions
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue