From 3a0f139b9e0e8a6f901a2447ab02ddb894b72b9f Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Wed, 25 Jan 2017 04:00:33 -0500 Subject: [PATCH] maximize: Officially honor screen padding Add an option too. Fix #1459 --- lib/awful/ewmh.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/awful/ewmh.lua b/lib/awful/ewmh.lua index ba0a44252..5fd9d73bf 100644 --- a/lib/awful/ewmh.lua +++ b/lib/awful/ewmh.lua @@ -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