repo: rxvt-unicode-sixel
action: commit
revision: 
path_from: 
revision_from: 5230c2e0393499d8f049b786c9f9639ebeece457:
path_to: 
revision_to: 
git.thebackupbox.net
rxvt-unicode-sixel
git clone git://git.thebackupbox.net/rxvt-unicode-sixel
commit 5230c2e0393499d8f049b786c9f9639ebeece457
Author: Marc Lehmann 
Date:   Mon Jun 4 21:33:47 2012 +0000

    *** empty log message ***

diff --git a/src/rxvtperl.xs b/src/rxvtperl.xs
index f8668f7b03cdaf9b4fd05d1517854aecc088306d..
index ..fe5a4c25a126fce4c04e40e0c604cd1039b048f1 100644
--- a/src/rxvtperl.xs
+++ b/src/rxvtperl.xs
@@ -1936,6 +1936,23 @@ rxvt_term::XTranslateCoordinates (Window src, Window dst, int x, int y)
 #############################################################################
 # fancy bg bloatstuff (TODO: should be moved up somewhere)

+# TODO: ugly
+void
+rxvt_term::get_geometry ()
+	PPCODE:
+        Window wdummy;
+        int x, y;
+        XWindowAttributes wattr;
+        XGetWindowAttributes (THIS->dpy, THIS->parent, &wattr);
+        XTranslateCoordinates (THIS->dpy, THIS->parent, wattr.root,
+                               -wattr.border_width, -wattr.border_width,
+                               &x, &y, &wdummy);
+	EXTEND (SP, 4);
+        PUSHs (sv_2mortal (newSViv (x)));
+        PUSHs (sv_2mortal (newSViv (y)));
+        PUSHs (sv_2mortal (newSViv (wattr.width)));
+        PUSHs (sv_2mortal (newSViv (wattr.height)));
+
 #if HAVE_IMG

 rxvt_img *

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