Subject: FVWM: Resizing hints ignored after manual resizes

From: SCoTT SMeDLeY <[email-masked]>
Date: Tue, 14 Jan 2003 16:47:27 +1100

Hi all,

Below is a trivial Perl/Tk app that illustrates a difficulty I am
having with FVWM.

The app automatically resizes itself when you click on the Grow &
Shrink buttons.

However, if I manually resize the app (by click-drag-release'ing
on the border) the app is no longer able to resize itself.

How can I force FVWM to let the app resize itself?

Thanks for any help/pointers,

SCoTT. :)
-- 
[email-masked]

#!/usr/bin/perl -w
 
use strict;
use Tk;

my $x = 100;
my $y = 100;

my $main = new MainWindow();

my $topFrame = $main->Frame();
$topFrame->pack(-expand => 1, -fill => 'both', -anchor => 'nw');
my $bFrame = $topFrame->Frame();
$bFrame->pack(-side => 'top', -expand => 0, -fill => 'x');

$bFrame->Button(-text => 'Grow',
              -command => [\&resize, 10]
              )->pack(-side => 'left', -expand => 0);
$bFrame->Button(-text => 'Shrink',
              -command => [\&resize, -10]
              )->pack(-side => 'left', -expand => 0);

my $f = $topFrame->Frame(-bg => 'blue', -width => $x, -height => $y);
$f->pack(-expand => 1, -fill => 'both', -side => 'top');

sub resize ($)
{
	my ($a) = @_;
	$x += $a;
	$y += $a;
	$f->configure(-width => $x, -height => $y);
}

MainLoop;
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 14 Jan 2003 08:23:45 +0100

> Thanks for any help/pointers,

I didn't try out, but it's probably another Tk bug.  Tk has
numerous problems resizing and moving its windows and widgets.
SOmetimes the order in which position and size are set does
matter.  Or try reading the window's position and dimension into
dummy variables before changing them.  I think Tk sometimes
'forgets' the current geometry of the window and does funny things
when you try to change them.

> 	$f->configure(-width => $x, -height => $y);

Bye

Dominik ^_^  ^_^