sub simple_nudge { my ($w) = @_; my $mw = $w->toplevel; my $geo = $mw->geometry; ($geo =~ /^(\d+)x(\d+)[+](\d+)[+](\d+)$/) or return; my ($w0, $h0, $x, $y) = ($1, $2, $3, $4); # Grow the main window by 1 pixel, then restore its original size my ($w1, $h1) = ($w0 + 1, $h0 + 1); $mw->geometry("${w1}x${h1}+${x}+${y}"); $mw->update; $mw->geometry("${w0}x${h0}+${x}+${y}"); $mw->update; }