Browse Source

Revert X11 changes

Dmitry Hrabrov 8 years ago
parent
commit
49f6b1134e
1 changed files with 5 additions and 1 deletions
  1. 5 1
      demo/x11/nuklear_xlib.h

+ 5 - 1
demo/x11/nuklear_xlib.h

@@ -389,8 +389,12 @@ nk_xsurf_draw_text(XSurface *surf, short x, short y, unsigned short w, unsigned
     const char *text, int len, XFont *font, struct nk_color cbg, struct nk_color cfg)
     const char *text, int len, XFont *font, struct nk_color cbg, struct nk_color cfg)
 {
 {
     int tx, ty;
     int tx, ty;
+    unsigned long bg = nk_color_from_byte(&cbg.r);
     unsigned long fg = nk_color_from_byte(&cfg.r);
     unsigned long fg = nk_color_from_byte(&cfg.r);
-    (void)cbg;
+
+    XSetForeground(surf->dpy, surf->gc, bg);
+    XFillRectangle(surf->dpy, surf->drawable, surf->gc, (int)x, (int)y, (unsigned)w, (unsigned)h);
+    if(!text || !font || !len) return;
 
 
     tx = (int)x;
     tx = (int)x;
     ty = (int)y + font->ascent;
     ty = (int)y + font->ascent;