aboutsummaryrefslogtreecommitdiff
path: root/apps/wm.c
diff options
context:
space:
mode:
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;
}