aboutsummaryrefslogtreecommitdiff
path: root/apps/wm.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/wm.c')
-rw-r--r--apps/wm.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/wm.c b/apps/wm.c
index becbf0a..8eb6f70 100644
--- a/apps/wm.c
+++ b/apps/wm.c
@@ -5,6 +5,7 @@
#include <gfx.h>
#include <gui.h>
#include <input.h>
+#include <ioctl.h>
#include <keymap.h>
#include <list.h>
#include <random.h>
@@ -361,11 +362,12 @@ static void handle_message(struct message *msg)
int main(int argc, char **argv)
{
- (void)argc;
- screen = *(struct vbe *)argv[1];
+ UNUSED(argc);
+ UNUSED(argv);
+ assert(ioctl("/dev/fb", IO_FB_GET, &screen) == 0);
+ log("WM loaded: %dx%d\n", screen.width, screen.height);
wm_client = (struct client){ .pid = getpid() };
bypp = (screen.bpp >> 3);
- log("WM loaded: %dx%d\n", screen.width, screen.height);
windows = list_new();
keymap = keymap_parse("/res/keymaps/en.keymap");