fix not tracking input cursor positions
This commit is contained in:
parent
2e51ce5f9b
commit
504219aefb
@ -88,11 +88,13 @@ ResetInputs(Inputs* inputs)
|
||||
}
|
||||
|
||||
void
|
||||
Push(Inputs* inputs, Input input, bool pressed)
|
||||
Push(Inputs* inputs, Input input, i32 x, i32 y, bool pressed)
|
||||
{
|
||||
DNode!(InputEvent)* node = Alloc!(DNode!(InputEvent))(&inputs.arena);
|
||||
node.value.key = input;
|
||||
node.value.pressed = pressed;
|
||||
node.value.x = x;
|
||||
node.value.y = y;
|
||||
|
||||
DLLPushFront(&inputs.list, node, null);
|
||||
}
|
||||
@ -386,7 +388,7 @@ HandleEvents(PlatformWindow* window)
|
||||
|
||||
if (input != KBI.None)
|
||||
{
|
||||
Push(inputs, input, pressed);
|
||||
Push(inputs, input, keyboard_event.root_x, keyboard_event.root_y, pressed);
|
||||
}
|
||||
} break;
|
||||
case XCB_BUTTON_PRESS:
|
||||
@ -406,7 +408,7 @@ HandleEvents(PlatformWindow* window)
|
||||
|
||||
if (input != Input.None)
|
||||
{
|
||||
Push(inputs, input, pressed);
|
||||
Push(inputs, input, mouse_event.root_x, mouse_event.root_y, pressed);
|
||||
}
|
||||
} break;
|
||||
case XCB_MOTION_NOTIFY:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user