repo: rxvt-unicode-sixel action: commit revision: path_from: revision_from: c2c59eb9c72087715bcebf1e03c64ac18ee25e95: path_to: revision_to:
commit c2c59eb9c72087715bcebf1e03c64ac18ee25e95 Author: Marc LehmannDate: Sat Mar 4 22:36:50 2006 +0000 *** empty log message *** diff --git a/Changes b/Changes
--- a/Changes
+++ b/Changes
@@ -21,6 +21,8 @@ DUMB: support tex fonts
- add FORCE_UNBUFFERED_XFT define to features.h.
- moved on_osc_seq to on_osc_seq_perl and added a more
generic osc_seq.
+ - fix a bug causing double callback invocations when perl hooks
+ were invoked recursively.
7.7 Tue Feb 21 12:32:49 CET 2006
- use double-buffered drawing (xft fonts only). On many driver/hardware
diff --git a/src/perl/automove-background b/src/perl/automove-background
--- a/src/perl/automove-background
+++ b/src/perl/automove-background
@@ -1,5 +1,25 @@
#! perl
+sub on_osc_seq {
+ my ($self, $op, $args) = @_;
+
+ if ($op == 20) {
+ my ($pic, $commands) = split(/;/, $args, 2);
+ warn " pic=$pic commands=$commands";
+ if ($pic !~ /^$/ && $commands !~ /[+\-]/) {
+ my ($x, $y) = $self->XTranslateCoordinates (
+ $self->vt, $self->DefaultRootWindow,
+ 0, 0
+ );
+ warn " $x $y \\033]20;$pic;=+$x+$y\\007";
+ $self->cmd_parse ("\033]20;$pic;=+$x+$y\007");
+ return 1;
+ }
+ }
+
+ ()
+}
+
sub on_configure_notify {
my ($self, $event) = @_;
diff --git a/src/urxvt.pm b/src/urxvt.pm
--- a/src/urxvt.pm
+++ b/src/urxvt.pm
@@ -909,10 +909,8 @@ sub invoke {
verbose 10, "$HOOKNAME[$htype] (" . (join ", ", $TERM, @_) . ")"
if $verbosity >= 10;
- keys %$cb;
-
- while (my ($pkg, $cb) = each %$cb) {
- my $retval_ = eval { $cb->($TERM->{_pkg}{$pkg}, @_) };
+ for my $pkg (keys %$cb) {
+ my $retval_ = eval { $cb->{$pkg}->($TERM->{_pkg}{$pkg}, @_) };
$retval ||= $retval_;
if ($@) {
-----END OF PAGE-----