From 0bf8bb6a64638dec0e588b9aef720ad14fde796a Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Thu, 26 Jan 2017 03:06:05 -0500 Subject: [PATCH] fullscreen: Add a beautiful option to remove borders. This was previously done in a callback, but wasn't really clean and/or bug free. Borders could end up leaking on other screens as proven by an integration test. Fix #171 --- lib/awful/ewmh.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lib/awful/ewmh.lua b/lib/awful/ewmh.lua index 5fd9d73b..5e263171 100644 --- a/lib/awful/ewmh.lua +++ b/lib/awful/ewmh.lua @@ -24,6 +24,10 @@ local ewmh = { -- @beautiful beautiful.maximized_honor_padding -- @tparam[opt=true] boolean maximized_honor_padding +--- Hide the border on fullscreen clients. +-- @beautiful beautiful.fullscreen_hide_border +-- @tparam[opt=true] boolean fullscreen_hide_border + --- 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"]. @@ -285,7 +289,19 @@ function ewmh.geometry(c, context, hints) props.honor_padding = beautiful.maximized_honor_padding ~= false end + if original_context == "fullscreen" and beautiful.fullscreen_hide_border ~= false then + props.ignore_border_width = true + end + aplace[context](c, props) + + -- Remove the border to get a "real" fullscreen. + if original_context == "fullscreen" and beautiful.fullscreen_hide_border ~= false then + local original = repair_geometry_lock + repair_geometry_lock = true + c.border_width = 0 + repair_geometry_lock = original + end end end