Subject: | Tk::Widget BusyRecurse |
Tk::Widget::Busy sets bindtags to 'Busy'-first for all its descendents
(as documented). However it does not configure the -cursor accordingly
in case the child is a Tk::Toplevel.
Test and patch against svn attached.
Best regards, Christoph
Subject: | busy.t |
use strict;
use warnings;
use Tk;
use Test::More (tests => 4);
use Tk;
my $mw = tkinit;
my $top = $mw->Toplevel;
$mw->update;
$mw->Busy(-recurse => 1);
for my $w ( $mw, $top){
is( ($w->bindtags)[0] , 'Busy' , "tag 'Busy' set for $w") ;
is( $w->cget('-cursor') , 'watch' , "cursor 'watch'set for $w");
}
Subject: | Widget.patch |
Index: Widget.pm
===================================================================
--- Widget.pm (revision 10674)
+++ Widget.pm (working copy)
@@ -881,7 +881,7 @@
my ($restore,$w,$cursor,$recurse,$top) = @_;
my $c = $w->cget('-cursor');
my @tags = $w->bindtags;
- if ($top || defined($c))
+ if ($top || defined($c) || $w->isa('Tk::Toplevel'))
{
push(@$restore, sub { return unless Tk::Exists($w); $w->configure(-cursor => $c); $w->bindtags(\@tags) });
$w->configure(-cursor => $cursor);