From 9a2fe3e091849518f3d2f79114ba67fa4fc63adf Mon Sep 17 00:00:00 2001 From: nasr Date: Fri, 9 Oct 2026 12:37:56 +0200 Subject: feature: window with sqaures etc etc --- source/loo/loo.cpp | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) (limited to 'source/loo') diff --git a/source/loo/loo.cpp b/source/loo/loo.cpp index e2de702..3a2cfef 100644 --- a/source/loo/loo.cpp +++ b/source/loo/loo.cpp @@ -5,30 +5,10 @@ ENTRYPOINT() MemArena *arena = ArenaCreate(MiB(100)); Assert(arena); -int fd = wayland_display_connect(arena); + LinuxWindowParams *params = PushStruct(arena, LinuxWindowParams); +params->name = (cstring)"Loo"; - state_t state = {0}; - state.wl_registry = wayland_wl_display_get_registry(fd), - state.w = 117, - state.h = 150, - state.stride = 117 * color_channels, - state.shm_pool_size = state.h * state.stride; - - - while (1) { - char read_buf[4096] = ""; - int64_t read_bytes = recv(fd, read_buf, sizeof(read_buf), 0); - if (read_bytes == -1) - exit(errno); - - char *msg = read_buf; - uint64_t msg_len = (uint64_t)read_bytes; - - while (msg_len > 0) - wayland_handle_message(fd, &state, &msg, &msg_len); - } + wayland_entrypoint(arena, params); return 0; - - } -- cgit v1.3.1