From 4a1964febbdbca6784b6f46bab142df36f519a24 Mon Sep 17 00:00:00 2001 From: Andrey Sidorov Date: Wed, 11 Apr 2012 16:50:14 +1000 Subject: [PATCH] all callbacks now have error as first argument --- lib/x11/ext/big-requests.js | 4 ++-- lib/x11/ext/render.js | 4 ++-- lib/x11/ext/xtest.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/x11/ext/big-requests.js b/lib/x11/ext/big-requests.js index 172d365..7e24cbb 100644 --- a/lib/x11/ext/big-requests.js +++ b/lib/x11/ext/big-requests.js @@ -4,8 +4,8 @@ exports.requireExt = function(display, callback) { var X = display.client; - X.QueryExtension('BIG-REQUESTS', function(ext) { - + X.QueryExtension('BIG-REQUESTS', function(err, ext) { + if (!ext.present) callback(new Error('extension not available')); diff --git a/lib/x11/ext/render.js b/lib/x11/ext/render.js index 0758385..817e55d 100644 --- a/lib/x11/ext/render.js +++ b/lib/x11/ext/render.js @@ -18,7 +18,7 @@ exports.requireExt = function(display, callback) } var X = display.client; - X.QueryExtension('RENDER', function(ext) { + X.QueryExtension('RENDER', function(err, ext) { if (!ext.present) { @@ -366,7 +366,7 @@ exports.requireExt = function(display, callback) X.pack_stream.flush(); } - ext.QueryPictFormat(function(formats) { + ext.QueryPictFormat(function(err, formats) { for (var i=0; i < formats.formats.length; ++i) { var f = formats.formats[i]; if (f[2] == 1 && f[10] == 1) diff --git a/lib/x11/ext/xtest.js b/lib/x11/ext/xtest.js index f4de80e..82b0c90 100644 --- a/lib/x11/ext/xtest.js +++ b/lib/x11/ext/xtest.js @@ -5,7 +5,7 @@ var x11 = require('..'); exports.requireExt = function(display, callback) { var X = display.client; - X.QueryExtension('XTEST', function(ext) { + X.QueryExtension('XTEST', function(err, ext) { if (!ext.present) callback(new Error('extension not available'));