--- rxvt-unicode/src/perl/tabbed 2008/06/15 14:54:44 1.25 +++ rxvt-unicode/src/perl/tabbed 2012/01/09 17:49:00 1.29 @@ -46,8 +46,6 @@ sub new_tab { my ($self, @argv) = @_; - my $offset = $self->fheight; - # save a backlink to us, make sure tabbed is inactive push @urxvt::TERM_INIT, sub { my ($term) = @_; @@ -81,12 +79,14 @@ $tab->XMoveResizeWindow ( $tab->parent, 0, $self->{tabheight} + 1, - $self->width, $self->height - $self->{tabheight} + $self->width, + $self->height - $self->{tabheight} + 2 * $tab->int_bwidth ); $tab->XMoveResizeWindow ( $tab->parent, 0, $self->{tabheight}, - $self->width, $self->height - $self->{tabheight} + $self->width, + $self->height - $self->{tabheight} + 2 * $tab->int_bwidth ); } @@ -107,13 +107,13 @@ # pass 1: copy over properties different or nonexisting for my $atom ($tab->XListProperties ($tab->parent)) { my ($type, $format, $items) = $self->XGetWindowProperty ($tab->parent, $atom); - + # fix up size hints if ($atom == $wm_normal_hints) { my (@hints) = unpack "l!*", $items; - + $hints[$_] += $self->{tabheight} for (4, 6, 16); - + $items = pack "l!*", @hints; } @@ -138,15 +138,15 @@ $cur->XUnmapWindow ($cur->parent) if $cur->mapped; $cur->focus_out; } - + $self->{cur} = $tab; $self->configure; $self->copy_properties; - + $tab->focus_out; # just in case, should be a nop $tab->focus_in if $self->focus; - + $tab->XMapWindow ($tab->parent); delete $tab->{activity}; $self->refresh; @@ -170,6 +170,14 @@ () } +sub on_tt_write { + my ($self, $octets) = @_; + + $self->{cur}->tt_write ($octets); + + 1 +} + sub on_key_press { my ($self, $event) = @_; @@ -314,7 +322,7 @@ ++$idx if $keysym == 0xff53; $self->make_current ($self->{tabs}[$idx % @{ $self->{tabs}}]); - + return 1; } elsif ($keysym == 0xff54) { $self->new_tab;