*** empty log message ***
authorroot <root>
Fri, 20 Jan 2006 14:41:07 +0000 (14:41 +0000)
committerroot <root>
Fri, 20 Jan 2006 14:41:07 +0000 (14:41 +0000)
src/perl/automove-background
src/rxvtperl.xs

index 6426c4ec7e78315dabd5d8e04eac4f18404aabf2..ab5697e22b8e4a4646bc246340ae14fb4afc6c5f 100644 (file)
@@ -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");
 }
index db75a99341b98c17a504d221dad65b20ad507a07..5150efd146abbc4e4599c85621580e1ee39f58a8 100644 (file)
@@ -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
 #############################################################################