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.3 by root, Fri Jan 20 12:18:05 2006 UTC vs.
Revision 1.4 by root, Fri Jan 20 13:32:29 2006 UTC

49} 49}
50 50
51sub configure { 51sub configure {
52 my ($self) = @_; 52 my ($self) = @_;
53 53
54 my $tabheight = $self->int_bwidth + $self->fheight + $self->lineSpace;
55
56 $self->{cur}->XMoveResizeWindow ( 54 $self->{cur}->XMoveResizeWindow (
57 $self->{cur}->parent, 55 $self->{cur}->parent,
58 0, $tabheight, 56 0, $self->{tabheight},
59 $self->width, $self->height - $tabheight 57 $self->width, $self->height - $self->{tabheight}
60 ); 58 );
61} 59}
62 60
63sub make_current { 61sub make_current {
64 my ($self, $tab) = @_; 62 my ($self, $tab) = @_;
70 68
71 $self->{cur} = $tab; 69 $self->{cur} = $tab;
72 70
73 $self->configure; 71 $self->configure;
74 72
73 my $wm_normal_hints = $self->XInternAtom ("WM_NORMAL_HINTS");
74
75 for my $atom ($tab->XListProperties ($tab->parent)) { 75 for my $atom ($tab->XListProperties ($tab->parent)) {
76 warn "$atom\n"; 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);
77 } 85 }
78 86
79 $tab->XMapWindow ($tab->parent); 87 $tab->XMapWindow ($tab->parent);
80 88
81 $self->refresh; 89 $self->refresh;
127 () 135 ()
128} 136}
129 137
130sub on_start { 138sub on_start {
131 my ($self) = @_; 139 my ($self) = @_;
140
141 $self->{tabheight} = $self->int_bwidth + $self->fheight + $self->lineSpace;
132 142
133 $self->cmd_parse ("\x1b[?25l\x1b[?7l"); 143 $self->cmd_parse ("\x1b[?25l\x1b[?7l");
134 $self->new_tab; 144 $self->new_tab;
135 $self->new_tab; 145 $self->new_tab;
136 $self->new_tab; 146 $self->new_tab;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines