diff --git a/platform.d b/platform.d index a313169..a028d26 100644 --- a/platform.d +++ b/platform.d @@ -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: