Set the override-redirect flag for the window with the overrideredirect method before mapping it (this is documented in the Tk::Wm man page). Example:
#!/usr/bin/perl
use warnings;
use strict;
use Tk;
my $mw = tkinit;
$mw->overrideredirect(1); # set the override-redirect flag
$mw->packPropagate(0); # prevent the window being resized
# for this demo
$mw->Button(
-text => 'Quit',
-command => sub { Tk::exit(0) },
)->pack(
-side => 'bottom',
);
# after a delay:
# withdraw
# clear the override-redirect flag
# re-map the window
$mw->after(
4000,
sub {
$mw->withdraw;
$mw->overrideredirect(0);
$mw->deiconify;
$mw->raise;
}
);
# NB:
# "Mastering Perl/Tk" mentions that clearing
# the override-redirect flag will not cause
# the window manager to supply decorations.
# This is true, but at least on KDE, clearing
# the flag, then unmapping and mapping the
# window puts decorations in place.
#
# Your mileage may vary.
MainLoop;
converter