From e820136810cbbf777effcc0a495946b273c5f5db Mon Sep 17 00:00:00 2001 From: actionless Date: Thu, 23 Apr 2020 07:41:18 +0200 Subject: [PATCH] fixup! fix(awful: placement: skip_fullscreen): force screen geometry doc(awful: placement: no_offscreen): add descriptions to examples --- tests/examples/awful/placement/skip_fullscreen.lua | 4 ++++ tests/examples/awful/placement/skip_fullscreen.output.txt | 2 ++ 2 files changed, 6 insertions(+) diff --git a/tests/examples/awful/placement/skip_fullscreen.lua b/tests/examples/awful/placement/skip_fullscreen.lua index bf020e2d..2e1e749e 100644 --- a/tests/examples/awful/placement/skip_fullscreen.lua +++ b/tests/examples/awful/placement/skip_fullscreen.lua @@ -4,15 +4,19 @@ local awful = {placement = require("awful.placement")} --DOC_HIDE --DOC_HIDE no_offscreen is auto-called when startup is true, avoid this. awesome.startup = false -- luacheck: globals awesome.startup --DOC_HIDE +-- using just no_offscreen with honor_workarea: local c = client.gen_fake {x = 0, y = 0, width= screen[1].geometry.width, height=screen[1].geometry.height} --DOC_HIDE c.fullscreen = true --DOC_HIDE +print("no_offscreen:") --DOC_HIDE print("Before:", "x="..c.x..", y="..c.y..", width="..c.width..", height="..c.height) --DOC_HIDE awful.placement.no_offscreen(c, {honor_workarea=true, }) print("After:", "x="..c.x..", y="..c.y..", width="..c.width..", height="..c.height) --DOC_HIDE c:kill() --DOC_HIDE +-- using no_offscreen + skip_fullscreen: c = client.gen_fake {x = 0, y = 0, width= screen[1].geometry.width, height=screen[1].geometry.height} --DOC_HIDE c.fullscreen = true --DOC_HIDE +print("no_offscreen + skip_fullscreen:") --DOC_HIDE print("Before:", "x="..c.x..", y="..c.y..", width="..c.width..", height="..c.height) --DOC_HIDE local f = (awful.placement.no_offscreen + awful.placement.skip_fullscreen) f(c, {honor_workarea=true, }) diff --git a/tests/examples/awful/placement/skip_fullscreen.output.txt b/tests/examples/awful/placement/skip_fullscreen.output.txt index fe735dd9..1df44693 100644 --- a/tests/examples/awful/placement/skip_fullscreen.output.txt +++ b/tests/examples/awful/placement/skip_fullscreen.output.txt @@ -1,4 +1,6 @@ +no_offscreen: Before: x=0, y=0, width=320, height=240 After: x=10, y=10, width=320, height=240 +no_offscreen + skip_fullscreen: Before: x=0, y=0, width=320, height=240 After: x=0, y=0, width=320, height=240