twtp doesn't care about borders, it does what it wants. honey badger wtp - wmutils - X windows manipulation utilities
 (HTM) git clone git://z3bra.org/wmutils
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit d846ef9a200885ba204f8537821c2956224d3562
 (DIR) parent b1f94e8bd0f93482920c3dca451e257dcf21dc7a
 (HTM) Author: dcat <dcat@iotek.org>
       Date:   Wed, 10 Dec 2014 23:15:05 +0100
       
       wtp doesn't care about borders, it does what it wants. honey badger wtp
       
       Diffstat:
         M wtp.c                               |      26 ++------------------------
       
       1 file changed, 2 insertions(+), 24 deletions(-)
       ---
 (DIR) diff --git a/wtp.c b/wtp.c
       t@@ -34,41 +34,19 @@ usage(char *name)
                exit(1);
        }
        
       -static int
       -get_border (xcb_window_t win)
       -{
       -        unsigned int bw = 0;
       -        xcb_get_geometry_reply_t *geom;
       -        geom = xcb_get_geometry_reply(conn, xcb_get_geometry(conn, win), NULL);
       -
       -        if (!geom)
       -                errx(1, "failed to get geometry");
       -
       -        bw = geom->border_width;
       -
       -        free(geom);
       -        return bw;
       -}
       -
        static void
        teleport (xcb_window_t win, int x, int y, int w, int h)
        {
       -        int bw = 0;
                uint32_t values[4];
                uint32_t mask =   XCB_CONFIG_WINDOW_X
                                | XCB_CONFIG_WINDOW_Y
                                | XCB_CONFIG_WINDOW_WIDTH
                                | XCB_CONFIG_WINDOW_HEIGHT;
       -        
       -        bw = get_border(win);
       -
       -        if (bw < 0)
       -                return;
        
                values[0] = x;
                values[1] = y;
       -        values[2] = w - (2*bw);
       -        values[3] = h - (2*bw);
       +        values[2] = w;
       +        values[3] = h;
        
                xcb_configure_window(conn, win, mask, values);
        }