Added patch for UTF8 window titles, fixes #1364

This commit is contained in:
Armin Novak 2015-01-15 14:25:43 +01:00
parent 1d8d363b7a
commit 9767f7f042
1 changed files with 8 additions and 0 deletions

View File

@ -509,6 +509,14 @@ void xf_SetWindowStyle(xfContext* xfc, xfAppWindow* appWindow, UINT32 style, UIN
void xf_SetWindowText(xfContext* xfc, xfAppWindow* appWindow, char* name)
{
XStoreName(xfc->display, appWindow->handle, name);
const size_t i = strlen(name);
XStoreName(xfc->display, window->handle, name);
Atom wm_Name = XInternAtom(xfc->display, "_NET_WM_NAME", FALSE);
Atom utf8Str = XInternAtom(xfc->display, "UTF8_STRING", FALSE);
XChangeProperty(xfc->display, window->handle, wm_Name, utf8Str, 8,
PropModeReplace, (unsigned char *)name, i);
}
void xf_FixWindowCoordinates(xfContext* xfc, int* x, int* y, int* width, int* height)