ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/perl/background
(Generate patch)

Comparing rxvt-unicode/src/perl/background (file contents):
Revision 1.4 by root, Tue Jun 5 13:39:26 2012 UTC vs.
Revision 1.5 by root, Tue Jun 5 13:42:59 2012 UTC

136 $self->get_geometry; 136 $self->get_geometry;
137 137
138 my $img = eval { $self->{expr}->() }; 138 my $img = eval { $self->{expr}->() };
139 warn $@ if $@;#d# 139 warn $@ if $@;#d#
140 140
141 %$old = ();
142
141 my $repeat; 143 my $repeat;
142 144
143 if (my $again = $state->{again}) { 145 if (my $again = $state->{again}) {
144 $repeat = 1; 146 $repeat = 1;
145 $state->{again} = urxvt::timer->new->after ($again)->cb (sub { $self->recalculate }); 147 $state->{again} = urxvt::timer->new->after ($again)->cb (sub { $self->recalculate });
157 $self->enable (size_change => sub { $_[0]->recalculate }); 159 $self->enable (size_change => sub { $_[0]->recalculate });
158 } else { 160 } else {
159 $self->disable ("size_change"); 161 $self->disable ("size_change");
160 } 162 }
161 163
164 unless ($repeat) {
165 delete $self->{state};
166 delete $self->{expr};
167 }
168
162 $img = $img->sub_rect (0, 0, $w, $h) 169 $img = $img->sub_rect (0, 0, $w, $h)
163 if $img->w != $w || $img->h != $h; 170 if $img->w != $w || $img->h != $h;
164 171
165 $self->set_background ($img); 172 $self->set_background ($img);
166 $self->scr_recolour (0); 173 $self->scr_recolour (0);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines