From 0288e45f08a4b2d1d323d927cae90250a0f80052 Mon Sep 17 00:00:00 2001 From: Santiago Gimeno Date: Fri, 21 Mar 2014 16:04:02 +0100 Subject: [PATCH 1/2] Add XFixes CreateRegionFromWindow request - And add WINDOW_REGION_KIND type. --- lib/ext/fixes.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/ext/fixes.js b/lib/ext/fixes.js index c6711b3..434a8ee 100644 --- a/lib/ext/fixes.js +++ b/lib/ext/fixes.js @@ -48,6 +48,11 @@ exports.requireExt = function(display, callback) X.pack_stream.flush(); }; + ext.WindowRegionKind = { + Bounding : 0, + Clip : 1 + }; + ext.CreateRegion = function(region, rects) { X.seq_num ++; var format = 'CCSL'; @@ -63,6 +68,12 @@ exports.requireExt = function(display, callback) X.pack_stream.pack(format, args); X.pack_stream.flush(); } + + ext.CreateRegionFromWindow = function(region, wid, kind) { + X.seq_num ++; + X.pack_stream.pack('CCSLLCxxx', [ ext.majorOpcode, 7, 4, region, wid, kind ]); + X.pack_stream.flush(); + } ext.DestroyRegion = function(region) { X.seq_num ++; From a8a8a9f0f2cb518854c3a2182ee50b91044d0c4c Mon Sep 17 00:00:00 2001 From: Santiago Gimeno Date: Fri, 21 Mar 2014 16:09:24 +0100 Subject: [PATCH 2/2] Fix typo in crtcs field --- lib/ext/randr.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ext/randr.js b/lib/ext/randr.js index 986fffb..fb69629 100644 --- a/lib/ext/randr.js +++ b/lib/ext/randr.js @@ -171,7 +171,7 @@ exports.requireExt = function(display, callback) pos += 24; var format = Array(res[2] + 1).join('L'); - resources.crcs = buf.unpack(format, pos); + resources.crtcs = buf.unpack(format, pos); pos += res[2] << 2; format = Array(res[3] + 1).join('L'); resources.outputs = buf.unpack(format, pos);