feat(awful: placement): add "skip_fullscreen"
This commit is contained in:
parent
87928befe2
commit
b71d522f8c
|
@ -1624,6 +1624,26 @@ function placement.restore(d, args)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Skip all preceeding results of placement pipeline for fullscreen clients.
|
||||||
|
--@DOC_awful_placement_skip_fullscreen_EXAMPLE@
|
||||||
|
-- @tparam drawable d A drawable (like `client`, `mouse` or `wibox`)
|
||||||
|
-- @tparam[opt={}] table args Other arguments
|
||||||
|
-- @treturn table The new geometry
|
||||||
|
-- @staticfct awful.placement.skip_fullscreen
|
||||||
|
function placement.skip_fullscreen(d, args)
|
||||||
|
args = add_context(args, "skip_fullscreen")
|
||||||
|
d = d or capi.client.focus
|
||||||
|
|
||||||
|
if d.fullscreen then
|
||||||
|
return {d:geometry(), {}, true}
|
||||||
|
else
|
||||||
|
local ngeo = geometry_common(d, args)
|
||||||
|
remove_border(d, args, ngeo)
|
||||||
|
geometry_common(d, args, ngeo)
|
||||||
|
return fix_new_geometry(ngeo, args, true)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return placement
|
return placement
|
||||||
|
|
||||||
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
||||||
|
|
Loading…
Reference in New Issue