wmutils

X windows manipulation utilities
git clone git://z3bra.org/wmutils
Log | Files | Refs | LICENSE

commit d846ef9a200885ba204f8537821c2956224d3562
parent b1f94e8bd0f93482920c3dca451e257dcf21dc7a
Author: dcat <dcat@iotek.org>
Date:   Wed Dec 10 23:15:05 2014

wtp doesn't care about borders, it does what it wants. honey badger wtp

Diffstat:
 wtp.c | 26 ++------------------------
 1 file changed, 2 insertions(+), 24 deletions(-)

diff --git a/wtp.c b/wtp.c @@ -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); }