From 876602ea9131f706dd60d41c7b8a3d6620d01048 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Mon, 24 Aug 2009 11:44:15 +0200 Subject: [PATCH] titlebar: fix push Titlebar are not stored inside client but inside global reference table. Signed-off-by: Julien Danjou --- client.c | 2 +- titlebar.h | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) 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); }