I still don't know the answers to my first two questions, but I figured out a way to emulate the window repositioning I was referring to in the third question. If anyone is interested in this, add the following code to the end of MoveAnything.lua:
Code:
-- Function to check if the CharacterFrame should push away another frame.
function MovAny.characterFrameCheck(f, ...)
-- Check which frame is open to replace the CharacterFrame, if any.
local frameToMove = nil
-- Only one of the following frames can be visible at a time!
if (MerchantFrame:IsVisible()) then
frameToMove = MerchantFrame
elseif (MailFrame:IsVisible()) then
frameToMove = MailFrame
end
if (not frameToMove) then
return
end
local opt = MovAny:GetUserData(frameToMove:GetName())
-- Check if CharacterFrame is visible.
if (CharacterFrame:IsVisible()) then
opt.pos = {"TOPLEFT", "CharacterFrame", "TOPRIGHT", 20, 0}
else
opt.pos = {"TOPLEFT", "CharacterFrame", "TOPLEFT", 0, 0}
end
MovAny.Position:Apply(opt, frameToMove)
end
hooksecurefunc(CharacterFrame, "Show", MovAny.characterFrameCheck)
hooksecurefunc(CharacterFrame, "Hide", MovAny.characterFrameCheck)
hooksecurefunc(MerchantFrame, "Show", MovAny.characterFrameCheck)
hooksecurefunc(MailFrame, "Show", MovAny.characterFrameCheck)