From 1fe90513bedc32cc6dc9194f26d34435d238b3b8 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Sun, 20 Oct 2019 01:56:28 -0400 Subject: [PATCH] placement: Do not depend on `awful.layout`. --- lib/awful/placement.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/awful/placement.lua b/lib/awful/placement.lua index e7cd547d9..18f204b7d 100644 --- a/lib/awful/placement.lua +++ b/lib/awful/placement.lua @@ -89,7 +89,7 @@ local capi = mouse = mouse, client = client } -local layout = require("awful.layout") +local floating = require("awful.layout.suit.floating") local a_screen = require("awful.screen") local grect = require("gears.geometry").rectangle local gdebug = require("gears.debug") @@ -938,7 +938,8 @@ function placement.no_overlap(c, args) local cls, curlay if client_on_selected_tags(c) then cls = screen:get_clients(false) - curlay = layout.get() + local t = screen.selected_tag + curlay = t.layout or floating else -- When placing a client on unselected tags, place it as if all tags of -- that client are selected. @@ -955,7 +956,7 @@ function placement.no_overlap(c, args) for _, cl in pairs(cls) do if cl ~= c and cl.type ~= "desktop" - and (cl.floating or curlay == layout.suit.floating) + and (cl.floating or curlay == floating) and not (cl.maximized or cl.fullscreen) then areas = grect.area_remove(areas, area_common(cl)) end