mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 04:54:35 +00:00
parent
44372b89f6
commit
b2030f6d73
@ -144,6 +144,7 @@ GLFW bundles a number of dependencies in the `deps/` directory.
|
|||||||
- [X11] Bugfix: X-axis scroll offsets were inverted
|
- [X11] Bugfix: X-axis scroll offsets were inverted
|
||||||
- [X11] Bugfix: Full screen override redirect windows were not always
|
- [X11] Bugfix: Full screen override redirect windows were not always
|
||||||
positioned over the specified monitor
|
positioned over the specified monitor
|
||||||
|
- [X11] Bugfix: Character input did not work for the default `"C"` locale
|
||||||
|
|
||||||
|
|
||||||
## Contact
|
## Contact
|
||||||
|
@ -1089,6 +1089,12 @@ typedef struct GLFWimage
|
|||||||
* bundle, if present. This can be disabled with a
|
* bundle, if present. This can be disabled with a
|
||||||
* [compile-time option](@ref compile_options_osx).
|
* [compile-time option](@ref compile_options_osx).
|
||||||
*
|
*
|
||||||
|
* @remarks __X11:__ If the `LC_CTYPE` category of the current locale is set to
|
||||||
|
* `"C"` then the environment's locale will be applied to that category. This
|
||||||
|
* is done because character input will not function when `LC_CTYPE` is set to
|
||||||
|
* `"C"`. If another locale was set before this function was called, it will
|
||||||
|
* be left untouched.
|
||||||
|
*
|
||||||
* @par Thread Safety
|
* @par Thread Safety
|
||||||
* This function may only be called from the main thread.
|
* This function may only be called from the main thread.
|
||||||
*
|
*
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <locale.h>
|
||||||
|
|
||||||
|
|
||||||
// Translate an X11 key code to a GLFW key code.
|
// Translate an X11 key code to a GLFW key code.
|
||||||
@ -709,6 +710,9 @@ Cursor _glfwCreateCursor(const GLFWimage* image, int xhot, int yhot)
|
|||||||
|
|
||||||
int _glfwPlatformInit(void)
|
int _glfwPlatformInit(void)
|
||||||
{
|
{
|
||||||
|
if (strcmp(setlocale(LC_CTYPE, NULL), "C") == 0)
|
||||||
|
setlocale(LC_CTYPE, "");
|
||||||
|
|
||||||
XInitThreads();
|
XInitThreads();
|
||||||
|
|
||||||
_glfw.x11.display = XOpenDisplay(NULL);
|
_glfw.x11.display = XOpenDisplay(NULL);
|
||||||
|
@ -37,7 +37,6 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <locale.h>
|
|
||||||
|
|
||||||
#include "getopt.h"
|
#include "getopt.h"
|
||||||
|
|
||||||
@ -443,8 +442,6 @@ int main(int argc, char** argv)
|
|||||||
GLFWmonitor* monitor = NULL;
|
GLFWmonitor* monitor = NULL;
|
||||||
int ch, i, width, height, count = 1;
|
int ch, i, width, height, count = 1;
|
||||||
|
|
||||||
setlocale(LC_ALL, "");
|
|
||||||
|
|
||||||
glfwSetErrorCallback(error_callback);
|
glfwSetErrorCallback(error_callback);
|
||||||
|
|
||||||
if (!glfwInit())
|
if (!glfwInit())
|
||||||
|
Loading…
Reference in New Issue
Block a user