forked from speedie/spmenu
xft crash workaround, only useful for debian/other distros that run an
ancient libxft version
This commit is contained in:
parent
a2257f2503
commit
393c24af3c
|
@ -340,9 +340,17 @@ drw_rect(Drw *drw, int x, int y, unsigned int w, unsigned int h, int filled, int
|
||||||
XDrawRectangle(drw->dpy, drw->drawable, drw->gc, x, y, w - 1, h - 1);
|
XDrawRectangle(drw->dpy, drw->drawable, drw->gc, x, y, w - 1, h - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
xerrordummy(Display *dpy, XErrorEvent *ee)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, unsigned int lpad, const char *text, int invert, Bool markup)
|
drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, unsigned int lpad, const char *text, int invert, Bool markup)
|
||||||
{
|
{
|
||||||
|
XSetErrorHandler(xerrordummy);
|
||||||
|
|
||||||
#if USEPANGO // pango
|
#if USEPANGO // pango
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
int ty;
|
int ty;
|
||||||
|
@ -523,8 +531,12 @@ drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, unsigned int lp
|
||||||
if (d)
|
if (d)
|
||||||
XftDrawDestroy(d);
|
XftDrawDestroy(d);
|
||||||
|
|
||||||
|
XSync(drw->dpy, False);
|
||||||
|
|
||||||
return x + (render ? w : 0);
|
return x + (render ? w : 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
XSync(drw->dpy, False);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in a new issue