diff options
Diffstat (limited to 'func')
-rw-r--r-- | func/noborders.lua | 6 | ||||
-rw-r--r-- | func/sloppyfocus.lua | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/func/noborders.lua b/func/noborders.lua index fe67024..83069af 100644 --- a/func/noborders.lua +++ b/func/noborders.lua @@ -2,14 +2,16 @@ local beautiful = require("beautiful") -- TODO this function will call arrange multiple times. once per each change of c.border_width local function update_borders(s) - local max = s.selected_tag.layout.name == "max" + if s.selected_tag == nil then return end + local max = s.selected_tag.layout.name == "max" + local floating = s.selected_tag.layout.name == "floating" local only_one = #s.tiled_clients == 1 -- use tiled_clients so that other floating windows don't affect the count -- but iterate over clients instead of tiled_clients as tiled_clients doesn't include maximized windows for _, c in pairs(s.clients) do if c.prevent_kill then c.border_width = beautiful.border_width * 3 - elseif (max or only_one or c.maximized) and not c.floating then + elseif (max or only_one or c.maximized) and not floating and not c.floating then c.border_width = 0 else c.border_width = beautiful.border_width diff --git a/func/sloppyfocus.lua b/func/sloppyfocus.lua index d044498..298059b 100644 --- a/func/sloppyfocus.lua +++ b/func/sloppyfocus.lua @@ -1,4 +1,5 @@ -- Enable sloppy focus, so that focus follows mouse. client.connect_signal("mouse::enter", function(c) - c:emit_signal("request::activate", "mouse_enter", { raise = true }) + --c:emit_signal("request::activate", "mouse_enter", { raise = true }) + c:emit_signal("request::activate", "mouse_enter") end) |