Handle client border when un/maximising

This commit is contained in:
cool-cool-sweat 2018-01-22 05:57:13 -05:00
parent 9a2c8d4ca8
commit a946a59e9c
1 changed files with 11 additions and 9 deletions

View File

@ -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)
-- }}}