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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines