From be691582ee12613278af24cb5a824eeb357f6324 Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Mon, 29 Jul 2024 11:27:22 -0400 Subject: some work on compositor --- applications/goldman/source/input.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 applications/goldman/source/input.cpp (limited to 'applications/goldman/source/input.cpp') diff --git a/applications/goldman/source/input.cpp b/applications/goldman/source/input.cpp new file mode 100644 index 0000000..0cd6922 --- /dev/null +++ b/applications/goldman/source/input.cpp @@ -0,0 +1,21 @@ +#include "input.hpp" +#include "main.hpp" + +[[noreturn]] void input_thread_main() { + + euler::syscall::set_thread_name("input thread"); + + while (true) { + + auto result = euler::syscall::get_input_packet(); + if (std::holds_alternative(result)) { + auto packet = std::get(result); + r->lock(); + r->bump_cursor(packet.x_changed, packet.y_changed); + r->unlock(); + r->dispatch_render(); + } + + } + +} -- cgit v1.2.3