ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/perl/tabbed
(Generate patch)

Comparing rxvt-unicode/src/perl/tabbed (file contents):
Revision 1.2 by root, Fri Jan 20 12:17:41 2006 UTC vs.
Revision 1.5 by root, Fri Jan 20 14:02:41 2006 UTC

49} 49}
50 50
51sub configure { 51sub configure {
52 my ($self) = @_; 52 my ($self) = @_;
53 53
54 my $tabheight = $self->int_bwidth + $self->fheight + $self->lineSpace; 54 my $tab = $self->{cur};
55 55
56 $self->{cur}->XMoveResizeWindow ( 56 $tab->XMoveResizeWindow (
57 $self->{cur}->parent, 57 $tab->parent,
58 0, $tabheight, 58 0, $self->{tabheight},
59 $self->width, $self->height - $tabheight 59 $self->width, $self->height - $self->{tabheight}
60 ); 60 );
61
62 my $wm_normal_hints = $self->XInternAtom ("WM_NORMAL_HINTS");
63
64 for my $atom ($tab->XListProperties ($tab->parent)) {
65 my ($type, $format, $items) = $self->XGetWindowProperty ($tab->parent, $atom);
66
67 if ($atom == $wm_normal_hints) {
68 my (@hints) = unpack "l!*", $items;
69
70 $hints[ 4] += $self->{tabheight};
71 $hints[16] += $self->{tabheight};
72 }
73 $self->XChangeWindowProperty ($self->parent, $atom, $type, $format, $items);
74 }
61} 75}
62 76
63sub make_current { 77sub make_current {
64 my ($self, $tab) = @_; 78 my ($self, $tab) = @_;
65 79
69 } 83 }
70 84
71 $self->{cur} = $tab; 85 $self->{cur} = $tab;
72 86
73 $self->configure; 87 $self->configure;
74
75 for my $atom ($tab->XListProperties) {
76 warn "$atom\n";
77 }
78 88
79 $tab->XMapWindow ($tab->parent); 89 $tab->XMapWindow ($tab->parent);
80 90
81 $self->refresh; 91 $self->refresh;
82 92
127 () 137 ()
128} 138}
129 139
130sub on_start { 140sub on_start {
131 my ($self) = @_; 141 my ($self) = @_;
142
143 $self->{tabheight} = $self->int_bwidth + $self->fheight + $self->lineSpace;
132 144
133 $self->cmd_parse ("\x1b[?25l\x1b[?7l"); 145 $self->cmd_parse ("\x1b[?25l\x1b[?7l");
134 $self->new_tab; 146 $self->new_tab;
135 $self->new_tab; 147 $self->new_tab;
136 $self->new_tab; 148 $self->new_tab;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines