Fix XIM input on non-UTF-8 locales

This commit is contained in:
Camilla Berglund
2015-10-09 13:23:34 +02:00
parent 842aeb8c47
commit 87ad8c0561
3 changed files with 44 additions and 1 deletions
+3 -1
View File
@@ -709,10 +709,12 @@ Cursor _glfwCreateCursor(const GLFWimage* image, int xhot, int yhot)
int _glfwPlatformInit(void)
{
#if !defined(X_HAVE_UTF8_STRING)
// HACK: If the current locale is C, apply the environment's locale
// This is done because the C locale breaks character input
// This is done because the C locale breaks wide character input
if (strcmp(setlocale(LC_CTYPE, NULL), "C") == 0)
setlocale(LC_CTYPE, "");
#endif
XInitThreads();