I ran into a glitch saving/restoring movewindow position when multiple plugins allowed dragging of a single shared miniwindow. Surely there are other ways of handling this situation across the plugins themselves, but the simplest solution seems to be the following change to movewindow.lua, where the actual miniwindow position is saved instead of the imagined position which is in this case not always correct (if the window doesn't exist, nothing is written to those variables).
I'm guessing only one if check is actually necessary, but wasn't willing to risk it without going and looking at the MUSHclient code, which I haven't done.
@@ -392,9 +392,13 @@
return
end -- no such window
- -- remember where the window was
- SetVariable ("mw_" .. win .. "_windowx", mwi.window_left)
- SetVariable ("mw_" .. win .. "_windowy", mwi.window_top)
+ -- remember where the window was
+ if WindowInfo(win, 10) then
+ SetVariable ("mw_" .. win .. "_windowx", WindowInfo(win, 10))
+ end
+ if WindowInfo(win, 11) then
+ SetVariable ("mw_" .. win .. "_windowy", WindowInfo(win, 11))
+ end
SetVariable ("mw_" .. win .. "_windowmode", mwi.window_mode)
SetVariable ("mw_" .. win .. "_windowflags", mwi.window_flags)
I'm guessing only one if check is actually necessary, but wasn't willing to risk it without going and looking at the MUSHclient code, which I haven't done.