I have not found a way to 'disable' a window. However, I have just started trying to figure out how to use the 'iconify' or 'withdraw' method to achieve the same effect.
......
# hide the window
$mw1->iconify;
# Do stuff in the second window
# on submit of second window,
$mw2->destroy;
$mw1->deiconifiy;
.......
iconify does not prevent the user from maximizing and playing in the first window. It simply minimizes the window.
The 'withdraw' method hides the window. There is no icon to maximize, thus the user is prevented from playing in the first window, until the requirements in the second window are satisfied.
......
# hide the window
$mw1->withdraw;
# Do stuff in the second window
# on submit of second window,
$mw2->destroy;
$mw1->deiconifiy;
.......
The one problem I have not figured out how to catch yet, is.....
When the first window is withdrawn, if the user closes the second window via the
window controls, rather than letting the application close it on a 'Cancel' or 'Continue' button, the first window stays withdrawn. The application is still running, but there are no displayed windows. There needs to be some way to watch the second window for an inappropriate close, so you can 'deiconify' the first window. If I figure out an effective way to manage 'withdraw', I'll post it.
HTH
keep the rudder amid ship and beware the odd typo