diff --git a/init.lua b/init.lua index 8ee6e86..c5944bc 100644 --- a/init.lua +++ b/init.lua @@ -34,16 +34,16 @@ local function region_tablist() end --+ focused client's region - for _, tc in ipairs(screen[1].tiled_clients) do - if not (tc.floating or tc.immobilized) then - if regions[active_region].x <= tc.x + tc.width + tc.border_width * 2 and - tc.x <= regions[active_region].x + regions[active_region].width and - regions[active_region].y <= tc.y + tc.height + tc.border_width * 2 and - tc.y <= regions[active_region].y + regions[active_region].height - then - tablist[#tablist + 1] = tc - end - end + for _, tc in ipairs(screen[focused_screen].tiled_clients) do + if not (tc.floating or tc.immobilized) then + if regions[active_region].x <= tc.x + tc.width + tc.border_width * 2 and + tc.x <= regions[active_region].x + regions[active_region].width and + regions[active_region].y <= tc.y + tc.height + tc.border_width * 2 and + tc.y <= regions[active_region].y + regions[active_region].height + then + tablist[#tablist + 1] = tc + end + end end --+ tablist inside the active region