--- rxvt-unicode/src/perl/urxvt-popup 2006/01/08 01:16:10 1.11 +++ rxvt-unicode/src/perl/urxvt-popup 2006/01/18 11:05:09 1.13 @@ -63,7 +63,8 @@ my ($row, $col) = ($event->{row}, $event->{col}); if ($col >= 0 && $col < $self->ncol && $row >= 0 && $row < @{ $self->{data}{item} }) { - $self->{data}{item}[$row]{activate}->($event); + my $item = $self->{data}{item}[$row]; + $item->{activate}->($event, $item); } $self->refresh; @@ -88,6 +89,9 @@ $_->{width} = $self->strwidth ($_->{text}) for @{ $data->{item} }; + $self->resource (title => "URxvt Popup Menu"); + $self->resource (name => "URxvt.popup"); + $self->resource ($_ => $data->{term}->resource ($_)) for qw(font boldFont italicFont boldItalicFont color+0 color+1); @@ -99,7 +103,6 @@ if ($data->{event}) { my $x = int List::Util::max 0, $data->{event}{x_root} - $width * $data->{term}->fwidth * 0.5; my $y = int List::Util::max 0, $data->{event}{y_root} - $data->{term}->fheight * 0.5; - $pos = "+$x+$y"; } @@ -132,7 +135,3 @@ } - - - -