Added character with modifiers callback.

The undefined behaviour changed with #40 has been reverted, making the
character-only callback again behave like a system text field.  This
behavior has now been documentated.

Fixes #203.
Fixes #305.
This commit is contained in:
Camilla Berglund
2014-06-12 23:04:20 +02:00
parent 9b6c14b7ae
commit 96b12ee504
9 changed files with 133 additions and 38 deletions
+4 -1
View File
@@ -609,7 +609,10 @@ static void processEvent(XEvent *event)
_glfwInputKey(window, key, event->xkey.keycode, GLFW_PRESS, mods);
if (character != -1)
_glfwInputChar(window, character);
{
const int plain = !(mods & (GLFW_MOD_CONTROL | GLFW_MOD_ALT));
_glfwInputChar(window, character, mods, plain);
}
break;
}