Fix maximized windows' geometry being slightly off screen when loading/reloading

This commit is contained in:
Alice Gaudon 2020-04-13 05:21:51 +02:00
parent 97e8188a1a
commit eaccc4b0df
2 changed files with 13 additions and 15 deletions

View File

@ -664,21 +664,6 @@ awful.rules.rules = {
}
-- }}}
-- {{{ Signals
-- Signal function to execute when a new client appears.
client.connect_signal("manage", function(c)
-- Set the windows at the slave,
-- i.e. put it at the end of others instead of setting it master.
-- if not awesome.startup then awful.client.setslave(c) end
if awesome.startup
and not c.size_hints.user_position
and not c.size_hints.program_position then
-- Prevent clients from being unreachable after screen count changes.
awful.placement.no_offscreen(c)
end
end)
-- Add a titlebar if titlebars_enabled is set to true in the rules.
client.connect_signal("request::titlebars", function(c)
-- buttons for the titlebar

View File

@ -52,6 +52,19 @@ local screenRight = function(geo)
end
end
client.connect_signal("manage", function (c)
if awesome.startup
and not c.size_hints.user_position
and not c.size_hints.program_position then
-- Prevent clients from being unreachable after screen count changes.
awful.placement.no_offscreen(c)
end
if c.maximized then
applyTile(c, maximizedTileGeometry)
end
end)
return {
key = {
tileRight = function (c)