From eaccc4b0dfd98d233ca2d32fc668148c066fa979 Mon Sep 17 00:00:00 2001 From: Alice Gaudon Date: Mon, 13 Apr 2020 05:21:51 +0200 Subject: [PATCH] Fix maximized windows' geometry being slightly off screen when loading/reloading --- simple/init.lua | 15 --------------- simple/tiling.lua | 13 +++++++++++++ 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/simple/init.lua b/simple/init.lua index 146e8cd..801c60e 100644 --- a/simple/init.lua +++ b/simple/init.lua @@ -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 diff --git a/simple/tiling.lua b/simple/tiling.lua index 8370e09..8538eb5 100644 --- a/simple/tiling.lua +++ b/simple/tiling.lua @@ -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)