… | |
… | |
49 | } |
49 | } |
50 | |
50 | |
51 | sub configure { |
51 | sub 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 | |
63 | sub make_current { |
77 | sub make_current { |
64 | my ($self, $tab) = @_; |
78 | my ($self, $tab) = @_; |
65 | |
79 | |
… | |
… | |
123 | () |
137 | () |
124 | } |
138 | } |
125 | |
139 | |
126 | sub on_start { |
140 | sub on_start { |
127 | my ($self) = @_; |
141 | my ($self) = @_; |
|
|
142 | |
|
|
143 | $self->{tabheight} = $self->int_bwidth + $self->fheight + $self->lineSpace; |
128 | |
144 | |
129 | $self->cmd_parse ("\x1b[?25l\x1b[?7l"); |
145 | $self->cmd_parse ("\x1b[?25l\x1b[?7l"); |
130 | $self->new_tab; |
146 | $self->new_tab; |
131 | $self->new_tab; |
147 | $self->new_tab; |
132 | $self->new_tab; |
148 | $self->new_tab; |