JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
convert XGetAtomName to xcb
authorDavid Hill <dhill@conformal.com>
Thu, 12 Jul 2012 18:51:01 +0000 (14:51 -0400)
committerReginald Kennedy <rk@rejii.com>
Fri, 20 Jul 2012 21:58:32 +0000 (05:58 +0800)
spectrwm.c

index 0e76488..0df1a4c 100644 (file)
@@ -7122,11 +7122,17 @@ propertynotify(XEvent *e)
        struct ws_win           *win;
        XPropertyEvent          *ev = &e->xproperty;
 #ifdef SWM_DEBUG
-       char                    *name;
-       name = XGetAtomName(display, ev->atom);
-       DNPRINTF(SWM_D_EVENT, "propertynotify: window: 0x%lx, atom: %s\n",
-           ev->window, name);
-       XFree(name);
+       xcb_get_atom_name_reply_t *r;
+
+       r = xcb_get_atom_name_reply(conn,
+               xcb_get_atom_name(conn, ev->atom),
+               NULL);
+       if (r) {
+               DNPRINTF(SWM_D_EVENT,
+                        "propertynotify: window: 0x%x, atom: %s\n",
+                       ev->window, );
+               free(r);
+       }
 #endif
 
        win = find_window(ev->window);