*** empty log message ***
authorroot <root>
Fri, 20 Jan 2006 14:02:41 +0000 (14:02 +0000)
committerroot <root>
Fri, 20 Jan 2006 14:02:41 +0000 (14:02 +0000)
src/perl/tabbed

index a049432cb618bab254c6b6f9e459edcb1fffc2e5..3e16b46dac04b907ac7e3caaafd3edc556b59158 100644 (file)
@@ -51,24 +51,13 @@ sub new_tab {
 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");
 
@@ -77,12 +66,25 @@ sub make_current {
 
       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);