Technically, at the C++ source code level, can an MDI window be given an "OnTop within mdi" attribute? If that is possible, and if you think hardcoding dragdrop windows to no longer restore focus would upset some users, then here's a way both issues could be solved without upsetting anyone:
Change the command-to-perform syntax from this:
filemask:command
To:
switch:filemask:command
Where "switch" would be documented for users as:
a = drag-drop window always stays active
m = drag-drop window only stays active if it is maximized; if not, allows other windows opened by your commandline to become active
n = drag-drop window always allows other windows opened by your commandline to become active
Then, under the hood, here's what would technically happen:
{
if ($dragdropwindow isMDIwindow) && ( ($prefix == a) || (($prefix == m) && ($dragdropwindow isMaximized)) ) {
give $dragdropwindow "OnTop within MDI" attribute
}
execute user /commands | /and | /aliases commandline here (and wait for them all to finish executing here, too)
if ($dragdropwindow isMDIwindow) && ( ($prefix == a) || (($prefix == m) && ($dragdropwindow isMaximized)) ) {
give $dragdropwindow "Active within MDI" attribute
remove $dragdropwindow's "OnTop within MDI" attribute
}
}
This would solve both reported issues:
n: means dragdrop window lets other windows take focus (dragdrop window becomes neither active nor temporarily ontop_within_mdi)
a: or m: cause the same "restore active" behavior as now, but also with this "dragdrop window temporarily OnTop within MDI" trick, so newly-opened windows won't flicker above the dragdropped window as now
mIRC's installer (for upgrade installations) could add "a:" to existing dragdrop entries to maintain expected behavior for existing users. For new installations, it could add the default entries as
m:*.*:/dcc send $1 $2- and
a:*.wav:/sound $1 $2-