maximize: Officially honor screen padding

Add an option too.

Fix #1459
This commit is contained in:
Emmanuel Lepage Vallee 2017-01-25 04:00:33 -05:00
parent 631e75a757
commit 3a0f139b9e
1 changed files with 9 additions and 0 deletions

View File

@ -13,12 +13,17 @@ local util = require("awful.util")
local aclient = require("awful.client")
local aplace = require("awful.placement")
local asuit = require("awful.layout.suit")
local beautiful = require("beautiful")
local ewmh = {
generic_activate_filters = {},
contextual_activate_filters = {},
}
--- Honor the screen padding when maximizing.
-- @beautiful beautiful.maximized_honor_padding
-- @tparam[opt=true] boolean maximized_honor_padding
--- The list of all registered generic request::activate (focus stealing)
-- filters. If a filter is added to only one context, it will be in
-- `ewmh.contextual_activate_filters`["context_name"].
@ -276,6 +281,10 @@ function ewmh.geometry(c, context, hints)
props.honor_workarea = honor_default
end
if props.honor_padding == nil and props.honor_workarea and context:match("maximize") then
props.honor_padding = beautiful.maximized_honor_padding ~= false
end
aplace[context](c, props)
end
end