#!/usr/bin/perl use warnings; use strict; use Tk; my $mw = tkinit; $mw->geometry("200x300+200+200"); $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;
In reply to Re: Prevent overidedirect from being always on top
by Anonymous Monk
in thread Prevent overidedirect from being always on top
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |