xfFloatbar* floatbar;
XWindowAttributes attr;
int i, width;
+ if (!xfc)
+ return NULL;
+
floatbar = (xfFloatbar*) calloc(1, sizeof(xfFloatbar));
floatbar->locked = TRUE;
XGetWindowAttributes(xfc->display, window, &attr);
XSetForeground(xfc->display, gc, xf_floatbar_get_color(xfc, FLOATBAR_COLOR_FOREGROUND));
XDrawString(xfc->display, floatbar->handle, gc, floatbar->width / 2 - len * 2, 15,
xfc->context.settings->ServerHostname, len);
+ XFreeGC(xfc->display, gc);
+ XFreeGC(xfc->display, shape_gc);
}
static xfFloatbarButton* xf_floatbar_get_button(xfContext* xfc, XEvent* event)