don't wait for the pixmap reply if we're just going to make a new one. just free...
authorDana Jansens <danakj@orodu.net>
Wed, 5 Mar 2008 18:26:19 +0000 (13:26 -0500)
committerDana Jansens <danakj@orodu.net>
Wed, 5 Mar 2008 18:26:19 +0000 (13:26 -0500)
window.c

index 138c1fe..a56899a 100644 (file)
--- a/window.c
+++ b/window.c
@@ -108,13 +108,13 @@ window_unref(d_window_t *pubw)
 static void
 window_update_pixmap(d_window_priv_t *w)
 {
-    xcb_pixmap_t p;
-
     if (window_is_zombie((d_window_t*)w)) return;
 
-    /* XXX can we save it for until we get the new pixmap? */
-    if ((p = window_get_pixmap((d_window_t*)w))) {
-        xcb_free_pixmap(w->sc->dpy->conn, p);
+    /* the pixmap may not be valid even though it is non-zero, but
+       we can free it anyways and let it fail.  we don't need to wait
+       for a response from the server */
+    if (w->pixmap) {
+        xcb_free_pixmap(w->sc->dpy->conn, w->pixmap);
         w->pixmap = XCB_NONE;
     }