… | |
… | |
49 | } |
49 | } |
50 | |
50 | |
51 | sub configure { |
51 | sub configure { |
52 | my ($self) = @_; |
52 | my ($self) = @_; |
53 | |
53 | |
|
|
54 | my $tab = $self->{cur}; |
|
|
55 | |
54 | $self->{cur}->XMoveResizeWindow ( |
56 | $tab->XMoveResizeWindow ( |
55 | $self->{cur}->parent, |
57 | $tab->parent, |
56 | 0, $self->{tabheight}, |
58 | 0, $self->{tabheight}, |
57 | $self->width, $self->height - $self->{tabheight} |
59 | $self->width, $self->height - $self->{tabheight} |
58 | ); |
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 | } |
59 | } |
75 | } |
60 | |
76 | |
61 | sub make_current { |
77 | sub make_current { |
62 | my ($self, $tab) = @_; |
78 | my ($self, $tab) = @_; |
63 | |
79 | |
… | |
… | |
67 | } |
83 | } |
68 | |
84 | |
69 | $self->{cur} = $tab; |
85 | $self->{cur} = $tab; |
70 | |
86 | |
71 | $self->configure; |
87 | $self->configure; |
72 | |
|
|
73 | my $wm_normal_hints = $self->XInternAtom ("WM_NORMAL_HINTS"); |
|
|
74 | |
|
|
75 | for my $atom ($tab->XListProperties ($tab->parent)) { |
|
|
76 | my ($type, $format, $items) = $self->XGetWindowProperty ($tab->parent, $atom); |
|
|
77 | |
|
|
78 | if ($atom == $wm_normal_hints) { |
|
|
79 | my (@hints) = unpack "l!*", $items; |
|
|
80 | $hints[ 4] += $self->{tabheight}; |
|
|
81 | $hints[16] += $self->{tabheight}; |
|
|
82 | $items = pack "l!*", @hints; |
|
|
83 | } |
|
|
84 | $self->XChangeWindowProperty ($self->parent, $atom, $type, $format, $items); |
|
|
85 | } |
|
|
86 | |
88 | |
87 | $tab->XMapWindow ($tab->parent); |
89 | $tab->XMapWindow ($tab->parent); |
88 | |
90 | |
89 | $self->refresh; |
91 | $self->refresh; |
90 | |
92 | |