From de2fa7938758ff83cabf06baf4c0ac7a230e78bf Mon Sep 17 00:00:00 2001 From: sanine-a Date: Sat, 24 Oct 2020 22:09:34 -0500 Subject: add more window functions and clean up window info access --- src/main.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 9b83a8f..a49d90b 100644 --- a/src/main.c +++ b/src/main.c @@ -12,11 +12,8 @@ int main(int argc, char** argv) if (!honey_setup(&L)) return 1; - lua_getglobal(L, "honey"); - lua_getfield(L, -1, "window"); - lua_getfield(L, -1, "internal"); + lua_rawgeti(L, LUA_REGISTRYINDEX, honey_window_info_ref); honey_window_information* info = lua_touserdata(L, -1); - lua_pop(L, 2); honey_window window = info->window; char* script; -- cgit v1.2.1