static void drawin_wipe(drawin_t *w) { /* The drawin must already be unmapped, else it * couldn't be garbage collected -> no unmap needed */ p_delete(&w->cursor); if(w->surface) { /* Make sure that cairo knows that this surface can't be unused anymore. * This is needed since lua could still have a reference to it. */ cairo_surface_finish(w->surface); cairo_surface_destroy(w->surface); w->surface = NULL; } if(w->window) { /* Activate BMA */ client_ignore_enterleave_events(); /* Make sure we don't accidentally kill the systray window */ drawin_systray_kickout(w); xcb_destroy_window(globalconf.connection, w->window); /* Deactivate BMA */ client_restore_enterleave_events(); w->window = XCB_NONE; } if(w->pixmap) { xcb_free_pixmap(globalconf.connection, w->pixmap); w->pixmap = XCB_NONE; } }
static void drawin_wipe(drawin_t *w) { /* The drawin must already be unmapped, else it * couldn't be garbage collected -> no unmap needed */ p_delete(&w->cursor); if(w->window) { /* Make sure we don't accidentally kill the systray window */ drawin_systray_kickout(w); xcb_destroy_window(globalconf.connection, w->window); w->window = XCB_NONE; } /* No unref needed because we are being garbage collected */ w->drawable = NULL; }