1 | #! perl |
1 | #! perl |
|
|
2 | |
|
|
3 | sub xy { |
|
|
4 | my ($self) = @_; |
|
|
5 | |
|
|
6 | $self->XTranslateCoordinates ( |
|
|
7 | $self->vt, $self->DefaultRootWindow, |
|
|
8 | 0, 0 |
|
|
9 | ) |
|
|
10 | } |
2 | |
11 | |
3 | sub on_osc_seq { |
12 | sub on_osc_seq { |
4 | my ($self, $op, $args) = @_; |
13 | my ($self, $op, $args) = @_; |
5 | |
14 | |
6 | if ($op == 20) { |
15 | if ($op == 20) { |
… | |
… | |
8 | if ($pic !~ /^$/ && $commands !~ /[+\-]/) { |
17 | if ($pic !~ /^$/ && $commands !~ /[+\-]/) { |
9 | my ($x, $y) = $self->XTranslateCoordinates ( |
18 | my ($x, $y) = $self->XTranslateCoordinates ( |
10 | $self->vt, $self->DefaultRootWindow, |
19 | $self->vt, $self->DefaultRootWindow, |
11 | 0, 0 |
20 | 0, 0 |
12 | ); |
21 | ); |
|
|
22 | my ($x, $y) = $self->xy; |
13 | $self->cmd_parse ("\033]20;$pic;=+$x+$y\007"); |
23 | $self->cmd_parse ("\033]20;$pic;=+$x+$y\007"); |
14 | return 1; |
24 | return 1; |
15 | } |
25 | } |
16 | } |
26 | } |
17 | |
27 | |
… | |
… | |
19 | } |
29 | } |
20 | |
30 | |
21 | sub on_configure_notify { |
31 | sub on_configure_notify { |
22 | my ($self, $event) = @_; |
32 | my ($self, $event) = @_; |
23 | |
33 | |
24 | my ($x, $y) = $self->XTranslateCoordinates ( |
34 | my ($x, $y) = $self->xy; |
25 | $self->vt, $self->DefaultRootWindow, |
|
|
26 | 0, 0 |
|
|
27 | ); |
|
|
28 | |
35 | |
29 | $self->cmd_parse ("\033]20;;=+$x+$y\007"); |
36 | $self->cmd_parse ("\033]20;;=+$x+$y\007"); |
|
|
37 | |
|
|
38 | () |
30 | } |
39 | } |