tests: Add initial size support to the test client
Signed-off-by: Sergey Vlasov <sigprof@gmail.com>
This commit is contained in:
parent
0e3979b8e4
commit
7f11bc1108
|
@ -12,8 +12,8 @@ Gtk.init()
|
||||||
|
|
||||||
local function open_window(class, title, options)
|
local function open_window(class, title, options)
|
||||||
local window = Gtk.Window {
|
local window = Gtk.Window {
|
||||||
default_width = 100,
|
default_width = options.default_width or 100,
|
||||||
default_height = 100,
|
default_height = options.default_height or 100,
|
||||||
title = title
|
title = title
|
||||||
}
|
}
|
||||||
if options.gravity then
|
if options.gravity then
|
||||||
|
@ -141,6 +141,15 @@ return function(class, title, sn_rules, callback, resize_increment, args)
|
||||||
if args.maximize_after then
|
if args.maximize_after then
|
||||||
options = options .. "maximize_after,"
|
options = options .. "maximize_after,"
|
||||||
end
|
end
|
||||||
|
if args.size then
|
||||||
|
options = table.concat {
|
||||||
|
options,
|
||||||
|
"default_width=",
|
||||||
|
args.size.width, ",",
|
||||||
|
"default_height=",
|
||||||
|
args.size.height, ","
|
||||||
|
}
|
||||||
|
end
|
||||||
if args.resize then
|
if args.resize then
|
||||||
options = table.concat {
|
options = table.concat {
|
||||||
options,
|
options,
|
||||||
|
|
Loading…
Reference in New Issue