in reply to Tk main window protocole maximize

As a practical workaround solution, you can use tybalt89's solution, and check the current width and height vs. the maximum screen size in the configure subroutine callback. Another less desirable hack is to use overrideredirect, to remove the Window Manager controls, and then make your own maximize button.
#!/usr/bin/perl use warnings; use strict; use Tk; my $top = MainWindow->new; $top->geometry('200x200+200+200'); $top->overrideredirect(1); $top->Button( -text => 'Maximize', -command => sub { $top->geometry($top->screenwidth . 'x' . $top->s +creenheight . '+0+0'); print "Maximized\n"; })->pack; $top->Button( -text => 'Exit', -command => sub { $top->destroy } )->pack; MainLoop;

I'm not really a human, but I play one on earth. ..... an animated JAPH