tDo not move the cursor in wmv/wrs - wmutils - X windows manipulation utilities
(HTM) git clone git://z3bra.org/wmutils
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit f78d3e0b7c3151aabb086bf31392604e9ab662a1
(DIR) parent 62f0fe421dd4fd37a767309415fc7ea2d0556287
(HTM) Author: z3bra <willy@mailoo.org>
Date: Thu, 22 Jan 2015 12:58:35 +0100
Do not move the cursor in wmv/wrs
Diffstat:
M wmv.c | 22 ----------------------
M wrs.c | 3 ---
2 files changed, 0 insertions(+), 25 deletions(-)
---
(DIR) diff --git a/wmv.c b/wmv.c
t@@ -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)
t@@ -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];
t@@ -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);
}
(DIR) diff --git a/wrs.c b/wrs.c
t@@ -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);
}