summaryrefslogtreecommitdiff
path: root/applications/goldman/source/input.cpp
diff options
context:
space:
mode:
authorBenji Dial <benji@benjidial.net>2024-07-29 11:27:22 -0400
committerBenji Dial <benji@benjidial.net>2024-07-29 11:27:22 -0400
commitbe691582ee12613278af24cb5a824eeb357f6324 (patch)
tree5982ca3aad5257f515c93f62735ff3d630aa3ab3 /applications/goldman/source/input.cpp
parent3636fd21e079c47bd8d62e773e178f68fe9c2052 (diff)
downloadhilbert-os-be691582ee12613278af24cb5a824eeb357f6324.tar.gz
some work on compositor
Diffstat (limited to 'applications/goldman/source/input.cpp')
-rw-r--r--applications/goldman/source/input.cpp21
1 files changed, 21 insertions, 0 deletions
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<euler::syscall::mouse_packet>(result)) {
+ auto packet = std::get<euler::syscall::mouse_packet>(result);
+ r->lock();
+ r->bump_cursor(packet.x_changed, packet.y_changed);
+ r->unlock();
+ r->dispatch_render();
+ }
+
+ }
+
+}