diff options
author | Marvin Borner | 2020-08-22 19:44:49 +0200 |
---|---|---|
committer | Marvin Borner | 2020-08-22 19:44:49 +0200 |
commit | 8bb7b5cceaaf96a5dd6321d35aae28748896d87b (patch) | |
tree | 9a4103fb1da636fdf0c5ec8f04425c0c388f527d /apps/wm.c | |
parent | 424dc57424ee17de77d689443f95d2e1bed72f4a (diff) |
Added *very* basic polling ipc
Diffstat (limited to 'apps/wm.c')
-rw-r--r-- | apps/wm.c | 18 |
1 files changed, 15 insertions, 3 deletions
@@ -34,9 +34,21 @@ int main(int argc, char **argv) gui_init("/font/spleen-16x32.psfu"); gui_write(vbe, 50, 50, text, "hallo"); - event_map(EVENT_KEYBOARD, onkey); - - while (1) { + //event_map(EVENT_KEYBOARD, onkey); // TODO: Fix events + + struct message *msg; + while (1) { // TODO: Remove continuous polling? + if (!(msg = msg_receive())) + continue; + + switch (msg->type) { + case MSG_NEW_WINDOW: + printf("New window for pid %d\n", msg->src); + break; + default: + printf("Unknown WM request!"); + } }; + return 0; } |