Re: FVWM: Resizing hints ignored after manual resizes

From: Dominik Vogt <fvwm_at_fvwm.org>
Date: Tue, 14 Jan 2003 08:23:45 +0100

On Tue, Jan 14, 2003 at 04:47:27PM +1100, SCoTT SMeDLeY wrote:
> 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,

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.

> #!/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) = _at__;
> $x += $a;
> $y += $a;
> $f->configure(-width => $x, -height => $y);
> }
>
> MainLoop;

Bye

Dominik ^_^ ^_^
--
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 majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Tue Jan 14 2003 - 01:23:43 GMT

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:54 BST