… | |
… | |
2642 | my ($self, $visible) = @_; |
2642 | my ($self, $visible) = @_; |
2643 | |
2643 | |
2644 | return unless $visible; |
2644 | return unless $visible; |
2645 | |
2645 | |
2646 | $self->{root}->on_post_alloc ("move_$self" => sub { |
2646 | $self->{root}->on_post_alloc ("move_$self" => sub { |
2647 | my $widget = $self->{owner}; |
2647 | my $widget = $self->{owner} |
|
|
2648 | or return; |
2648 | |
2649 | |
2649 | my ($x, $y) = $widget->coord2global ($widget->{w}, 0); |
2650 | my ($x, $y) = $widget->coord2global ($widget->{w}, 0); |
2650 | |
2651 | |
2651 | ($x, $y) = $widget->coord2global (-$self->{w}, 0) |
2652 | ($x, $y) = $widget->coord2global (-$self->{w}, 0) |
2652 | if $x + $self->{w} > $::WIDTH; |
2653 | if $x + $self->{w} > $::WIDTH; |