vurtun / nuklear

A single-header ANSI C gui library
13.7k stars 1.11k forks source link

x11_xft resize issue #870

Closed Lory171 closed 5 years ago

Lory171 commented 5 years ago

Using the X11 backend with XFT fonts from demo/x11_xft, when you resize the window the font disappear. This happen because we are creating a new drawable surface for the resized window, but we are not updating the reference in XftDraw * ftdraw.

Adding the following code to the end of function nk_xsurf_resize in nuklear_xlib.h fix the issue. #ifdef NK_XLIB_USE_XFT XftDrawChange(surf->ftdraw, surf->drawable); #endif return;

dumblob commented 5 years ago

Yeah, just make a pull and I'll happily merge it :wink:.

Lory171 commented 5 years ago

871