Keep instance data when adjusting.
This commit is contained in:
parent
946494ecf0
commit
bf2151475f
|
@ -543,7 +543,7 @@ function module.create(data)
|
||||||
area = areas[area].parent_id
|
area = areas[area].parent_id
|
||||||
end
|
end
|
||||||
|
|
||||||
layout.machi_set_cmd(machi_engine.areas_to_command(areas), tag)
|
layout.machi_set_cmd(machi_engine.areas_to_command(areas), tag, true)
|
||||||
awful.layout.arrange(screen)
|
awful.layout.arrange(screen)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -196,15 +196,17 @@ function module.create(args_or_name, editor, default_cmd)
|
||||||
return instance.client_data, instance.tag_data, instance.areas_cache[key], instance, args.new_placement_cb
|
return instance.client_data, instance.tag_data, instance.areas_cache[key], instance, args.new_placement_cb
|
||||||
end
|
end
|
||||||
|
|
||||||
local function set_cmd(cmd, tag)
|
local function set_cmd(cmd, tag, keep_instance_data)
|
||||||
local instance = get_instance_(tag)
|
local instance = get_instance_(tag)
|
||||||
if instance.cmd ~= cmd then
|
if instance.cmd ~= cmd then
|
||||||
instance.cmd = cmd
|
instance.cmd = cmd
|
||||||
instance.areas_cache = {}
|
instance.areas_cache = {}
|
||||||
|
if not keep_instance_data then
|
||||||
instance.tag_data = {}
|
instance.tag_data = {}
|
||||||
instance.client_data = setmetatable({}, {__mode="k"})
|
instance.client_data = setmetatable({}, {__mode="k"})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local function arrange(p)
|
local function arrange(p)
|
||||||
local useless_gap = p.useless_gap
|
local useless_gap = p.useless_gap
|
||||||
|
|
Loading…
Reference in New Issue