mirror of
https://github.com/LDDestroier/CC/
synced 2025-01-31 11:19:11 +00:00
Fixed swapping
This commit is contained in:
parent
d3d149400a
commit
566590a298
@ -712,7 +712,6 @@ local newInstance = function(x, y, program, initialStart)
|
|||||||
y = y,
|
y = y,
|
||||||
active = initialStart,
|
active = initialStart,
|
||||||
program = program or config.defaultProgram,
|
program = program or config.defaultProgram,
|
||||||
runningProgram = program or config.defaultProgram,
|
|
||||||
window = window,
|
window = window,
|
||||||
timer = {},
|
timer = {},
|
||||||
extraEvents = {},
|
extraEvents = {},
|
||||||
@ -782,11 +781,11 @@ local scrollWindows = function(doScrollWindows, tickDownTimers)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local swapInstances = function(xmod, ymod)
|
local swapInstances = function(xmod, ymod)
|
||||||
instances[focus[2]][focus[1]].co, instances[focus[2] + ymod][focus[1] + xmod].co = instances[focus[2] + ymod][focus[1] + xmod].co, instances[focus[2]][focus[1]].co
|
for k,v in pairs(instances[focus[2]][focus[1]]) do
|
||||||
instances[focus[2]][focus[1]].window, instances[focus[2] + ymod][focus[1] + xmod].window = instances[focus[2] + ymod][focus[1] + xmod].window, instances[focus[2]][focus[1]].window
|
if k ~= "x" and k ~= "y" then
|
||||||
instances[focus[2]][focus[1]].active, instances[focus[2] + ymod][focus[1] + xmod].active = instances[focus[2] + ymod][focus[1] + xmod].active, instances[focus[2]][focus[1]].active
|
instances[focus[2]][focus[1]][k], instances[focus[2] + ymod][focus[1] + xmod][k] = instances[focus[2] + ymod][focus[1] + xmod][k], instances[focus[2]][focus[1]][k]
|
||||||
instances[focus[2]][focus[1]].env, instances[focus[2] + ymod][focus[1] + xmod].env = instances[focus[2] + ymod][focus[1] + xmod].env, instances[focus[2]][focus[1]].env
|
end
|
||||||
instances[focus[2]][focus[1]].timer, instances[focus[2] + ymod][focus[1] + xmod].timer = instances[focus[2] + ymod][focus[1] + xmod].timer, instances[focus[2]][focus[1]].timer
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local addWorkspace = function(xmod, ymod)
|
local addWorkspace = function(xmod, ymod)
|
||||||
|
Loading…
Reference in New Issue
Block a user