Subject: | Xquartz: immediate deiconify breaks toplevel |
On a Mac OS X system with Xquartz 2.79 the following sample script has problematic behavior:
perl -MTk -e '$mw=tkinit;$mw->Label(-text=>"test")->pack;$mw->iconify; MainLoop'
This would iconify the window as expected. The toolbar contains the iconified window and looks as expected. But if the iconified window is clicked to be deiconified, then it vanishes.
Workaround: iconify must not be called immediately, but some time after running the MainLoop. afterIdle() does not seem to work, but using 1000ms works, i.e.:
$mw->after(1000, sub { $mw->iconify });