wmutils

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

commit f78d3e0b7c3151aabb086bf31392604e9ab662a1
parent 62f0fe421dd4fd37a767309415fc7ea2d0556287
Author: z3bra <willy@mailoo.org>
Date:   Thu Jan 22 12:58:35 2015

Do not move the cursor in wmv/wrs

Diffstat:
 wmv.c | 22 ----------------------
 wrs.c |  3 ---
 2 files changed, 0 insertions(+), 25 deletions(-)

diff --git a/wmv.c b/wmv.c @@ -12,7 +12,6 @@ static xcb_screen_t *scr; static void usage(char *); static void move(xcb_window_t, int, int); -static void center_pointer(xcb_window_t); static void usage(char *name) @@ -22,26 +21,6 @@ usage(char *name) } static void -center_pointer(xcb_window_t win) -{ - uint32_t values[1]; - xcb_get_geometry_reply_t *geom; - geom = xcb_get_geometry_reply(conn, xcb_get_geometry(conn, win), NULL); - - if (!geom) - errx(1, "center_pointer: missing geometry!"); - - xcb_warp_pointer(conn, XCB_NONE, win, 0, 0, 0, 0, - (geom->width + (geom->border_width * 2)) / 2, - (geom->height + (geom->border_width * 2)) / 2); - - values[0] = XCB_STACK_MODE_ABOVE; - xcb_configure_window(conn, win, XCB_CONFIG_WINDOW_STACK_MODE, values); - - free(geom); -} - -static void move(xcb_window_t win, int x, int y) { uint32_t values[2]; @@ -79,7 +58,6 @@ move(xcb_window_t win, int x, int y) xcb_configure_window(conn, win, XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y, values); - center_pointer(win); free(geom); } diff --git a/wrs.c b/wrs.c @@ -50,9 +50,6 @@ resize(xcb_window_t w, int x, int y) xcb_configure_window(conn, w, mask, val); - xcb_warp_pointer(conn, XCB_NONE, w, 0, 0, 0, 0, r->width + x, - r->height + y); - free(r); }