diff --git a/lib/awful/placement.lua b/lib/awful/placement.lua index 279dc679d..12079961f 100644 --- a/lib/awful/placement.lua +++ b/lib/awful/placement.lua @@ -646,12 +646,6 @@ end --- Maximize a drawable horizontally, vertically or both. -- Valid args: -- --- * *margins*: A margin value or table --- * *honor_workarea*: --- * *honor_padding*: --- * *tag*: Use a tag geometry, this honor the workarea, padding and gaps --- * *parent*: A parent drawable to use a base geometry --- * *bounding_rect*: A bounding rectangle -- * *axis*:The axis (vertical or horizontal). If none is -- specified, then the drawable will be maximized on both axis. -- diff --git a/tests/examples/awful/placement/maximize.lua b/tests/examples/awful/placement/maximize.lua new file mode 100644 index 000000000..5a7bfe735 --- /dev/null +++ b/tests/examples/awful/placement/maximize.lua @@ -0,0 +1,18 @@ +screen[1]._resize {width = 128, height = 96} --DOC_HIDE +screen._add_screen {x = 140, y = 0, width = 128, height = 96} --DOC_HIDE +screen._add_screen {x = 280, y = 0, width = 128, height = 96} --DOC_HIDE +local placement = require("awful.placement") --DOC_HIDE + +for k, pos in ipairs{ --DOC_HIDE + "", "vertical", "horizontal" --DOC_HIDE + } do --DOC_HIDE + local c1 = client.gen_fake {--DOC_HIDE + x = screen[k].geometry.x+40, --DOC_HIDE + y = screen[k].geometry.y+40, width=75, height=50, screen=screen[k]} --DOC_HIDE + placement.maximize(c1, {axis = pos ~= "" and pos or nil}) --DOC_HIDE + + if k == 1 then --DOC_HIDE + assert(c1.width+2*c1.border_width == screen[1].geometry.width and --DOC_HIDE + c1.height+2*c1.border_width == screen[1].geometry.height) --DOC_HIDE + end --DOC_HIDE +end --DOC_HIDE