ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/perl/automove-background
(Generate patch)

Comparing rxvt-unicode/src/perl/automove-background (file contents):
Revision 1.6 by root, Sat Mar 4 22:36:50 2006 UTC vs.
Revision 1.9 by root, Sat Mar 4 23:07:30 2006 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines