… | |
… | |
199 | sub show { |
199 | sub show { |
200 | my ($self) = @_; |
200 | my ($self) = @_; |
201 | |
201 | |
202 | return if $self->{parent}; |
202 | return if $self->{parent}; |
203 | |
203 | |
204 | $self->{toplevel} = 1; |
|
|
205 | $CFClient::UI::ROOT->add ($self); |
204 | $CFClient::UI::ROOT->add ($self); |
206 | } |
205 | } |
207 | |
206 | |
208 | sub hide { |
207 | sub hide { |
209 | my ($self) = @_; |
208 | my ($self) = @_; |
… | |
… | |
2823 | $self->check_size; |
2822 | $self->check_size; |
2824 | $::WANT_REFRESH++; |
2823 | $::WANT_REFRESH++; |
2825 | } |
2824 | } |
2826 | |
2825 | |
2827 | sub add { |
2826 | sub add { |
2828 | my ($self, $child) = @_; |
2827 | my ($self, @children) = @_; |
2829 | |
2828 | |
|
|
2829 | for my $child (@children) { |
|
|
2830 | $child->{toplevel} = 1; |
|
|
2831 | |
2830 | # integerise window positions |
2832 | # integerise window positions |
2831 | $child->{x} = int $child->{x}; |
2833 | $child->{x} = int $child->{x}; |
2832 | $child->{y} = int $child->{y}; |
2834 | $child->{y} = int $child->{y}; |
|
|
2835 | } |
2833 | |
2836 | |
2834 | $self->SUPER::add ($child); |
2837 | $self->SUPER::add (@children); |
2835 | } |
2838 | } |
2836 | |
2839 | |
2837 | sub on_refresh { |
2840 | sub on_refresh { |
2838 | my ($self, $id, $cb) = @_; |
2841 | my ($self, $id, $cb) = @_; |
2839 | |
2842 | |