This is the mail archive of the
xconq7@sources.redhat.com
mailing list for the Xconq project.
[RFC] Possible BadWindow/BadDrawable Fix
So far the only way I have been able to get rid of the BadWindow errors in
the Tcl/Tk interface on X is to destroy a window after it is withdrawn.
This can be done in tkconq.tcl with:
wm withdraw .windowpath
destroy .windowpath
Perhaps the "destroy" part could be wrapped in:
if { "$tcl_platform(platform)" == "unix" } { }
Or it can be done in tkmain.c with:
tkwin = Tk_NameToWindow(interp, ".windowpath", Tk_MainWindow(interp));
if (NULL == tkwin){
/* Appropriate error message here. */
}
else{
Tk_UnmapWindow(tkwin);
Tk_DestroyWindow(tkwin);
}
And perhaps this could be wrapped in an appropriate #ifdef.
This has implications for window reuse. In the case of the .newgame window,
it doesn't really matter, but means that other windows will need to be
recreated from scratch each time they show up in the game.
My personal opinion is that new users are more likely to be scared off by the
X messages than by a slightly longer delay due to window recreation. This delay
is probably negligible on most modern machines, _not that I am advocating the
neglect of older machines....
I will make up the necessary patches tomorrow, if I see no serious objections
to this proposal.
Thanks,
Eric