mirror of
https://github.com/glfw/glfw.git
synced 2024-11-26 06:14:35 +00:00
Cleanup
This commit is contained in:
parent
ada1fdc14d
commit
067d1d6935
@ -123,10 +123,8 @@ typedef struct _GLFWwindowX11
|
|||||||
int warpCursorPosX, warpCursorPosY;
|
int warpCursorPosX, warpCursorPosY;
|
||||||
|
|
||||||
// The information from the last KeyPress event
|
// The information from the last KeyPress event
|
||||||
struct {
|
unsigned int lastKeyCode;
|
||||||
unsigned int keycode;
|
Time lastKeyTime;
|
||||||
Time time;
|
|
||||||
} last;
|
|
||||||
|
|
||||||
} _GLFWwindowX11;
|
} _GLFWwindowX11;
|
||||||
|
|
||||||
|
@ -960,15 +960,15 @@ static void processEvent(XEvent *event)
|
|||||||
// HACK: Ignore duplicate key press events generated by ibus
|
// HACK: Ignore duplicate key press events generated by ibus
|
||||||
// Corresponding release events are filtered out by the
|
// Corresponding release events are filtered out by the
|
||||||
// GLFW key repeat logic
|
// GLFW key repeat logic
|
||||||
if (window->x11.last.keycode != keycode ||
|
if (window->x11.lastKeyCode != keycode ||
|
||||||
window->x11.last.time != event->xkey.time)
|
window->x11.lastKeyTime != event->xkey.time)
|
||||||
{
|
{
|
||||||
if (keycode)
|
if (keycode)
|
||||||
_glfwInputKey(window, key, keycode, GLFW_PRESS, mods);
|
_glfwInputKey(window, key, keycode, GLFW_PRESS, mods);
|
||||||
}
|
}
|
||||||
|
|
||||||
window->x11.last.keycode = keycode;
|
window->x11.lastKeyCode = keycode;
|
||||||
window->x11.last.time = event->xkey.time;
|
window->x11.lastKeyTime = event->xkey.time;
|
||||||
|
|
||||||
if (!filtered)
|
if (!filtered)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user