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.4 by root, Fri Jan 20 13:32:29 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 $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
61sub make_current { 77sub 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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines