--- rxvt-unicode/src/perl/tabbed 2008/06/15 14:54:44 1.25 +++ rxvt-unicode/src/perl/tabbed 2012/06/06 15:06:41 1.31 @@ -1,5 +1,10 @@ #! perl +#:META:X_RESOURCE:tabbar-fg:tab bar foreground colour +#:META:X_RESOURCE:tabbar-bg:tab bar background colour +#:META:X_RESOURCE:tab-fg:tab foreground colour +#:META:X_RESOURCE:tab-bg:tab background colour + sub refresh { my ($self) = @_; @@ -46,8 +51,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) = @_; @@ -107,13 +110,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 +141,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 +173,14 @@ () } +sub on_tt_write { + my ($self, $octets) = @_; + + $self->{cur}->tt_write ($octets); + + 1 +} + sub on_key_press { my ($self, $event) = @_; @@ -314,7 +325,7 @@ ++$idx if $keysym == 0xff53; $self->make_current ($self->{tabs}[$idx % @{ $self->{tabs}}]); - + return 1; } elsif ($keysym == 0xff54) { $self->new_tab;