aboutsummaryrefslogtreecommitdiff
path: root/apps/wm.c
diff options
context:
space:
mode:
authorMarvin Borner2020-08-22 19:44:49 +0200
committerMarvin Borner2020-08-22 19:44:49 +0200
commit8bb7b5cceaaf96a5dd6321d35aae28748896d87b (patch)
tree9a4103fb1da636fdf0c5ec8f04425c0c388f527d /apps/wm.c
parent424dc57424ee17de77d689443f95d2e1bed72f4a (diff)
Added *very* basic polling ipc
Diffstat (limited to 'apps/wm.c')
-rw-r--r--apps/wm.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/apps/wm.c b/apps/wm.c
index f3ac901..5896e92 100644
--- a/apps/wm.c
+++ b/apps/wm.c
@@ -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;
}