tWTF! we don't need geometry - wmutils - X windows manipulation utilities
 (HTM) git clone git://z3bra.org/wmutils
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit bdb3b35e838bf051857237a5bd4e0241a0c5bc52
 (DIR) parent c4588e45882b4b5249fd4a7f4f3eb26631f7a8f0
 (HTM) Author: dcat <dcat@iotek.org>
       Date:   Thu, 18 Dec 2014 14:10:20 +0100
       
       WTF! we don't need geometry
       
       Diffstat:
         M wtf.c                               |      18 +++---------------
       
       1 file changed, 3 insertions(+), 15 deletions(-)
       ---
 (DIR) diff --git a/wtf.c b/wtf.c
       t@@ -24,7 +24,6 @@
        static xcb_connection_t *conn;
        
        static void usage (char *name);
       -static void set_focus (xcb_window_t);
        
        static void
        usage (char *name)
       t@@ -33,19 +32,6 @@ usage (char *name)
                exit(1);
        }
        
       -static void
       -set_focus (xcb_window_t win)
       -{
       -        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_set_input_focus(conn, XCB_INPUT_FOCUS_POINTER_ROOT, win,
       -                        XCB_CURRENT_TIME);
       -}
       -
        int
        main (int argc, char **argv)
        {
       t@@ -61,7 +47,9 @@ main (int argc, char **argv)
                if (!win)
                        errx(1, "could not get focused window");
        
       -        set_focus(win);
       +        xcb_set_input_focus(conn, XCB_INPUT_FOCUS_POINTER_ROOT, win,
       +                        XCB_CURRENT_TIME);
       +
                xcb_flush(conn);
        
                kill_xcb(&conn);