From 2f66f04d9fb2069ba918f93cbace338642ac16a5 Mon Sep 17 00:00:00 2001 From: Tim Roes Date: Sat, 3 Jan 2015 20:41:33 +0100 Subject: [PATCH] feat: add LowerWindow method --- lib/corereqs.js | 5 +++++ test/configure-window.js | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/lib/corereqs.js b/lib/corereqs.js index 57fca8d..5a93de0 100644 --- a/lib/corereqs.js +++ b/lib/corereqs.js @@ -396,6 +396,11 @@ var templates = { } ], + LowerWindow: [ + function(win) { + return module.exports.ConfigureWindow[0](win, { stackMode : 1 }); + } + ], QueryTree: [ ['CxSL', [15, 2]], diff --git a/test/configure-window.js b/test/configure-window.js index 8d9bf4a..00ec6ba 100644 --- a/test/configure-window.js +++ b/test/configure-window.js @@ -72,6 +72,16 @@ describe('ConfigureWindow', function() { this.X.RaiseWindow(this.wid); }); + it('should LowerWindow correctly', function(done) { + var self = this; + this.X.once('event', function(ev) { + ev.type.should.equal(22); /* ConfigureNotify */ + ev.aboveSibling.should.equal(0); /* 0 -> no window below this */ + done(); + }); + this.X.LowerWindow(this.wid); + }); + after(function(done) { this.X.DestroyWindow(this.wid); this.X.DestroyWindow(this.wid_helper);