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