$w-> stayOnTop (); # the shadow: unless ($w-> {'shadow'}){ # create the toplevel 'shadow': $w->{'shadow'} = $w-> Toplevel ( -height => $w-> height, -width => $w-> width, ); $w->{'shadow'}-> overrideredirect (1); $w->{'shadow'}-> configure (-background => '#666666'); $w->{'shadow'}-> Label (-takefocus => 1)-> place (); my ($shadow_x, $shadow_y) = ($xx+2, $y+11); $w->{'shadow'}-> geometry ("+$shadow_x+$shadow_y"); } else{ my ($shadow_x, $shadow_y) = ($xx+2, $y+11); $w->{'shadow'}-> geometry ("+$shadow_x+$shadow_y"); $w-> {'shadow'}-> configure (-height => $w-> height, -width => $w-> width,); $w->{'shadow'}-> deiconify (); }