From 7f11bc11081e2e26ece725774a1563769e79a7d2 Mon Sep 17 00:00:00 2001 From: Sergey Vlasov Date: Wed, 12 Sep 2018 08:20:53 +0300 Subject: [PATCH] tests: Add initial size support to the test client Signed-off-by: Sergey Vlasov --- tests/_client.lua | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tests/_client.lua b/tests/_client.lua index 7bbfb3108..349a00701 100644 --- a/tests/_client.lua +++ b/tests/_client.lua @@ -12,8 +12,8 @@ Gtk.init() local function open_window(class, title, options) local window = Gtk.Window { - default_width = 100, - default_height = 100, + default_width = options.default_width or 100, + default_height = options.default_height or 100, title = title } if options.gravity then @@ -141,6 +141,15 @@ return function(class, title, sn_rules, callback, resize_increment, args) if args.maximize_after then options = options .. "maximize_after," end + if args.size then + options = table.concat { + options, + "default_width=", + args.size.width, ",", + "default_height=", + args.size.height, "," + } + end if args.resize then options = table.concat { options,