diff --git a/client.c b/client.c index 4619a83d..ceddf83f 100644 --- a/client.c +++ b/client.c @@ -1899,7 +1899,7 @@ luaA_client_get_icon(lua_State *L, client_t *c) static int luaA_client_get_titlebar(lua_State *L, client_t *c) { - return luaA_object_push_item(L, -2, c->titlebar); + return luaA_object_push(L, c->titlebar); } static int diff --git a/titlebar.h b/titlebar.h index cbcab658..c1ad630f 100644 --- a/titlebar.h +++ b/titlebar.h @@ -147,8 +147,7 @@ titlebar_update_geometry(client_t *c) /* Client geometry without titlebar, but including borders, since that is always consistent. */ titlebar_geometry_compute(c, titlebar_geometry_remove(c->titlebar, 0, c->geometry), &geom); - luaA_object_push(globalconf.L, c); - luaA_object_push_item(globalconf.L, -1, c->titlebar); + luaA_object_push(globalconf.L, c->titlebar); wibox_moveresize(globalconf.L, -1, geom); lua_pop(globalconf.L, 2); }