Let switcher include all clients in a region with nested layout.
This commit is contained in:
parent
a651f5528e
commit
d6d75423d9
17
switcher.lua
17
switcher.lua
|
@ -100,11 +100,19 @@ function module.start(c, exit_keys)
|
||||||
if tablist == nil then
|
if tablist == nil then
|
||||||
tablist = {}
|
tablist = {}
|
||||||
|
|
||||||
for _, tc in ipairs(screen.tiled_clients) do
|
for i, a in ipairs(regions) do
|
||||||
if not (tc.floating or tc.maximized or tc.maximized_horizontal or tc.maximized_vertical)
|
if a.x <= traverse_x and traverse_x < a.x + a.width and
|
||||||
|
a.y <= traverse_y and traverse_y < a.y + a.height
|
||||||
then
|
then
|
||||||
if tc.x <= traverse_x and traverse_x < tc.x + tc.width + tc.border_width * 2 and
|
active_region = i
|
||||||
tc.y <= traverse_y and traverse_y < tc.y + tc.height + tc.border_width * 2
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
for _, tc in ipairs(screen.tiled_clients) do
|
||||||
|
if not (tc.floating or tc.immobilized)
|
||||||
|
then
|
||||||
|
if regions[active_region].x <= tc.x and tc.x + tc.width + tc.border_width * 2 <= regions[active_region].x + regions[active_region].width and
|
||||||
|
regions[active_region].y <= tc.y and tc.y + tc.height + tc.border_width * 2 <= regions[active_region].y + regions[active_region].height
|
||||||
then
|
then
|
||||||
tablist[#tablist + 1] = tc
|
tablist[#tablist + 1] = tc
|
||||||
end
|
end
|
||||||
|
@ -157,6 +165,7 @@ function module.start(c, exit_keys)
|
||||||
cr:stroke()
|
cr:stroke()
|
||||||
cr:reset_clip()
|
cr:reset_clip()
|
||||||
|
|
||||||
|
-- TODO deduplicate this with code in maintain_tablist()
|
||||||
if a.x <= traverse_x and traverse_x < a.x + a.width and
|
if a.x <= traverse_x and traverse_x < a.x + a.width and
|
||||||
a.y <= traverse_y and traverse_y < a.y + a.height
|
a.y <= traverse_y and traverse_y < a.y + a.height
|
||||||
then
|
then
|
||||||
|
|
Loading…
Reference in New Issue