From 0459daf5589679ad7dc719c877ecd2d068c229dd Mon Sep 17 00:00:00 2001 From: root Date: Fri, 20 Jan 2006 14:41:07 +0000 Subject: [PATCH] *** empty log message *** --- src/perl/automove-background | 7 ++++++- src/rxvtperl.xs | 16 ++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/perl/automove-background b/src/perl/automove-background index 6426c4ec..ab5697e2 100644 --- a/src/perl/automove-background +++ b/src/perl/automove-background @@ -3,5 +3,10 @@ sub on_configure_notify { my ($self, $event) = @_; - $self->cmd_parse ("\033]20;;=+$event->{x}+$event->{y}\007"); + my ($x, $y) = $self->XTranslateCoordinates ( + $self->parent, $self->DefaultRootWindow, + 0, 0 + ); + + $self->cmd_parse ("\033]20;;=+$x+$y\007"); } diff --git a/src/rxvtperl.xs b/src/rxvtperl.xs index db75a993..5150efd1 100644 --- a/src/rxvtperl.xs +++ b/src/rxvtperl.xs @@ -1736,6 +1736,22 @@ void XMoveResizeWindow (rxvt_term *term, Window window, int x, int y, unsigned int width, unsigned int height) C_ARGS: term->display->display, (Window)window, x, y, width, height +void +rxvt_term::XTranslateCoordinates (Window src, Window dst, int x, int y) + PPCODE: +{ + int dx, dy; + Window child; + + if (XTranslateCoordinates (THIS->display->display, src, dst, x, y, &dx, &dy, &child)) + { + EXTEND (SP, 3); + PUSHs (newSViv (dx)); + PUSHs (newSViv (dy)); + PUSHs (newSVuv (child)); + } +} + ############################################################################# # urxvt::overlay ############################################################################# -- 2.34.1