textbox.c
// will also unmap the window if still displayed
will also unmap the window if still displayed
will also unmap the window if still displayed
void textbox_free(textbox *tb)
{
	if (tb->flags & TB_EDITABLE)
	{
		XDestroyIC(tb->xic);
		XCloseIM(tb->xim);
	}
	if (tb->text) free(tb->text);
	if (tb->prompt) free(tb->prompt);
	if (tb->font) XftFontClose(display, tb->font);
	XDestroyWindow(display, tb->window);
	free(tb);
}
void textbox_free ( textbox * tb ) { if ( tb -> flags & TB_EDITABLE ) { XDestroyIC ( tb -> xic ) ; XCloseIM ( tb -> xim ) ; } if ( tb -> text ) free ( tb -> text ) ; if ( tb -> prompt ) free ( tb -> prompt ) ; if ( tb -> font ) XftFontClose ( display , tb -> font ) ; XDestroyWindow ( display , tb -> window ) ; free ( tb ) ; }
will also unmap the window if still displayed
will also unmap the window if still displayed