From d748a6f54ce7af45afde487936d5a02cb2a91b05 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sat, 22 Aug 2020 15:08:57 +0200 Subject: Added event resolving --- apps/init.c | 4 ---- apps/wm.c | 7 +++---- 2 files changed, 3 insertions(+), 8 deletions(-) (limited to 'apps') diff --git a/apps/init.c b/apps/init.c index 07977ee..ba3e15a 100644 --- a/apps/init.c +++ b/apps/init.c @@ -1,12 +1,8 @@ // MIT License, Copyright (c) 2020 Marvin Borner -#include #include -#include -#include #include #include -#include int main(int argc, char **argv) { diff --git a/apps/wm.c b/apps/wm.c index 88c0451..262270a 100644 --- a/apps/wm.c +++ b/apps/wm.c @@ -1,6 +1,5 @@ // MIT License, Copyright (c) 2020 Marvin Borner -#include #include #include #include @@ -10,10 +9,11 @@ void onkey(u32 scancode) { - printf("KEY EVENT %d\n", scancode); + printf("WM KEY EVENT %d\n", scancode); if (KEY_ALPHANUMERIC(scancode)) { printf("ALPHANUMERIC!\n"); } + event_resolve(); } int main(int argc, char **argv) @@ -31,8 +31,7 @@ int main(int argc, char **argv) gui_init("/font/spleen-16x32.psfu"); gui_write(vbe, 50, 50, text, "hallo"); - printf("onkey: %x\n", onkey); - map(EVENT_KEYBOARD, onkey); + event_map(EVENT_KEYBOARD, onkey); while (1) { }; -- cgit v1.2.3