--- rxvt-unicode/src/urxvt.pm 2006/01/08 08:43:11 1.57 +++ rxvt-unicode/src/urxvt.pm 2006/01/08 22:58:13 1.58 @@ -536,7 +536,10 @@ @_, ) and last; }; - warn $@ if $@;#d# + if ($@) { + $TERM->ungrab; # better to lose the grab than the session + warn $@; + } } } @@ -576,6 +579,10 @@ goto &$urxvt::term::proxy::AUTOLOAD; } +sub urxvt::term::proxy::DESTROY { + # nop +} + # urxvt::destroy_hook sub urxvt::destroy_hook::DESTROY { @@ -1159,8 +1166,8 @@ type => "button", text => " $text", value => $value, - render => sub { ($item->{value} ? "* " : " ") . $text }, - activate => sub { $cb->($item->{value} = !$item->{value}); }, + render => sub { ($_[0]{value} ? "* " : " ") . $text }, + activate => sub { $cb->($_[0]{value} = !$_[0]{value}); }, }; $self->add_item ($item); @@ -1180,6 +1187,7 @@ sub DESTROY { my ($self) = @_; + delete $self->{term}{_destroy}{$self}; $self->{term}->ungrab; } @@ -1293,11 +1301,11 @@ =over 4 -=item =0 - only fatal messages +=item == 0 - fatal messages -=item =3 - script loading and management +=item >= 3 - script loading and management -=item =10 - all events received +=item >=10 - all events received =back