diff --git a/rc.lua.template b/rc.lua.template index 9c4b14b..335291a 100644 --- a/rc.lua.template +++ b/rc.lua.template @@ -711,14 +711,16 @@ client.connect_signal("mouse::enter", function(c) end) -- No border for maximized clients -client.connect_signal("focus", - function(c) - if c.maximized then -- no borders if only 1 client visible - c.border_width = 0 - elseif #awful.screen.focused().clients > 1 then - c.border_width = beautiful.border_width - c.border_color = beautiful.border_focus - end - end) +function border_adjust(c) + if c.maximized then -- no borders if only 1 client visible + c.border_width = 0 + elseif #awful.screen.focused().clients > 1 then + c.border_width = beautiful.border_width + c.border_color = beautiful.border_focus + end +end + +client.connect_signal("focus", border_adjust) +client.connect_signal("property::maximized", border_adjust) client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end) -- }}}