From 0eab45520e194895618250ff02ab93cbba195abd Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Sun, 23 Apr 2017 04:50:12 -0400 Subject: [PATCH] tests: Add maximization support to the test client Both a "before manage" and "later" mode. --- tests/_client.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/_client.lua b/tests/_client.lua index 684c17cd..8c592cef 100644 --- a/tests/_client.lua +++ b/tests/_client.lua @@ -32,8 +32,14 @@ local function open_window(class, title, options) } window:set_geometry_hints(nil, geom, Gdk.WindowHints.RESIZE_INC) end + if options.maximize_before then + window:maximize() + end window:set_wmclass(class, class) window:show_all() + if options.maximize_after then + window:maximize() + end end local function parse_options(options) @@ -124,6 +130,12 @@ return function(class, title, sn_rules, callback, resize_increment, args) if resize_increment then options = options .. "resize_increment," end + if args.maximize_before then + options = options .. "maximize_before," + end + if args.maximize_after then + options = options .. "maximize_after," + end if args.gravity then assert(type(args.gravity)=="number","Use `lgi.Gdk.Gravity.NORTH_WEST`") options = options .. "gravity=" .. args.gravity .. ","