Moved X11 character translation failure test.

master
siavash ago%!(EXTRA string=12 years) committed by Camilla Berglund
parent f1397843ee
commit b12c973922
  1. 3
      src/input.c
  2. 6
      src/x11_window.c

@ -154,9 +154,6 @@ void _glfwInputKey(_GLFWwindow* window, int key, int scancode, int action, int m
void _glfwInputChar(_GLFWwindow* window, unsigned int character)
{
if (character == -1)
return;
if (character < 32 || (character > 126 && character < 160))
return;

@ -520,7 +520,11 @@ static void processEvent(XEvent *event)
_glfwInputKey(window, key, event->xkey.keycode, GLFW_PRESS, mods);
if (!(mods & GLFW_MOD_CONTROL) && !(mods & GLFW_MOD_ALT))
_glfwInputChar(window, translateChar(&event->xkey));
{
const int character = translateChar(&event->xkey);
if (character != -1)
_glfwInputChar(window, character);
}
break;
}

Loading…
Cancel
Save