-- Leo's gemini proxy

-- Connecting to git.thebackupbox.net:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

repo: rxvt-unicode-sixel
action: commit
revision:
path_from:
revision_from: d21240c3e04bd97af073aaa5a384a601668834d3:
path_to:
revision_to:

git.thebackupbox.net

rxvt-unicode-sixel

git://git.thebackupbox.net/rxvt-unicode-sixel

commit d21240c3e04bd97af073aaa5a384a601668834d3
Author: Marc Lehmann <schmorp@schmorp.de>
Date:   Fri Jan 20 14:41:07 2006 +0000

    *** empty log message ***

diff --git a/src/perl/automove-background b/src/perl/automove-background

index 6426c4ec7e78315dabd5d8e04eac4f18404aabf2..

index ..ab5697e22b8e4a4646bc246340ae14fb4afc6c5f 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 db75a99341b98c17a504d221dad65b20ad507a07..

index ..5150efd146abbc4e4599c85621580e1ee39f58a8 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
 #############################################################################

-----END OF PAGE-----

-- Response ended

-- Page fetched on Sun Jun 2 13:19:19 2024