I suppose I'm in the #test channel and open a dialog by the command "/dialog -m dialogtest dialogtest" (Actually does not have to be a channel, but any window other than the Status Window).
The dialog dialogtest has a button that opens and closes an @testwindow.
When you open @testwindow, the #test channel is in the second plane in mIRC.
However, when the @testwindow is closed, with the dialogtest open, the #test channel, which is in the second plane, is not left as the active window for mIRC, but being active as "Status Window". But actually "Status Window" is not active on the screen, but rather the channel.
Is this a correct behavior or a bug?
Code to reproduce:
alias dialogtest dialog $iif($dialog(dialogtest),-v,-m dialogtest) dialogtest
dialog dialogtest {
title "test"
size -1 -1 75 33
option dbu
button "Open/Close @testwindow", 1, 3 4 70 12
text "", 2, 3 21 70 8
}
on *:DIALOG:dialogtest:init:0:did -o $dname 2 1 Active: $active
on *:DIALOG:dialogtest:close:0:echo -a Active: $active
on *:DIALOG:dialogtest:sclick:1:{
if ($window(@testwindow)) {
window -c @testwindow
did -o $dname 2 1 Active: $active
echo -a Active: $active
}
else {
window @testwindow
did -o $dname 2 1 Active: $active
echo -a Active: $active
}
}
1. before it is in a window other than "Status Window"
2. open the dialog /dialogtest
3. click on the button in the dialog, open @testwindow
4. click on the button again, close @testwindow
5. close the dialog
Note that when opening and closing @testwindow, the window is active is the "Status Window", but when closing the dialog, the active window is activated before opening the dialog.
The correct one would not be the window that was opened the dialog being the active window after closing @testwindow?