sub configure {
my ($self) = @_;
- $self->{cur}->XMoveResizeWindow (
- $self->{cur}->parent,
+ my $tab = $self->{cur};
+
+ $tab->XMoveResizeWindow (
+ $tab->parent,
0, $self->{tabheight},
$self->width, $self->height - $self->{tabheight}
);
-}
-
-sub make_current {
- my ($self, $tab) = @_;
-
- if (my $cur = $self->{cur}) {
- $cur->XUnmapWindow ($cur->parent)
- if $cur->mapped;
- }
-
- $self->{cur} = $tab;
-
- $self->configure;
my $wm_normal_hints = $self->XInternAtom ("WM_NORMAL_HINTS");
if ($atom == $wm_normal_hints) {
my (@hints) = unpack "l!*", $items;
+
$hints[ 4] += $self->{tabheight};
$hints[16] += $self->{tabheight};
- $items = pack "l!*", @hints;
}
$self->XChangeWindowProperty ($self->parent, $atom, $type, $format, $items);
}
+}
+
+sub make_current {
+ my ($self, $tab) = @_;
+
+ if (my $cur = $self->{cur}) {
+ $cur->XUnmapWindow ($cur->parent)
+ if $cur->mapped;
+ }
+
+ $self->{cur} = $tab;
+
+ $self->configure;
$tab->XMapWindow ($tab->parent);