Merge pull request #4904 from akallabeth/floatbar_x11_leak
Fixed floatbar X11 leak.
This commit is contained in:
commit
6554bc3b8d
@ -204,6 +204,9 @@ xfFloatbar* xf_floatbar_new(xfContext* xfc, Window window)
|
||||
xfFloatbar* floatbar;
|
||||
XWindowAttributes attr;
|
||||
int i, width;
|
||||
if (!xfc)
|
||||
return NULL;
|
||||
|
||||
floatbar = (xfFloatbar*) calloc(1, sizeof(xfFloatbar));
|
||||
floatbar->locked = TRUE;
|
||||
|
||||
@ -299,6 +302,8 @@ static void xf_floatbar_event_expose(xfContext* xfc, XEvent* event)
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user