diff --git a/mouse.c b/mouse.c index cf7bf498..99a2e06f 100644 --- a/mouse.c +++ b/mouse.c @@ -133,13 +133,13 @@ luaA_mouse_index(lua_State *L) * having lots of lua errors in this case. */ if (globalconf.focus.client) - luaA_pushscreen(L, globalconf.focus.client->screen); + luaA_object_push(L, globalconf.focus.client->screen); else - luaA_pushscreen(L, screen_get_primary()); + luaA_object_push(L, screen_get_primary()); return 1; } - luaA_pushscreen(L, screen_getbycoord(mouse_x, mouse_y)); + luaA_object_push(L, screen_getbycoord(mouse_x, mouse_y)); return 1; } diff --git a/objects/client.c b/objects/client.c index 4f1d8b98..a8c7299f 100644 --- a/objects/client.c +++ b/objects/client.c @@ -2296,7 +2296,7 @@ luaA_client_get_screen(lua_State *L, client_t *c) { if(!c->screen) return 0; - luaA_pushscreen(L, c->screen); + luaA_object_push(L, c->screen); return 1; } diff --git a/objects/screen.c b/objects/screen.c index 9fbcdfcc..044fb9ed 100644 --- a/objects/screen.c +++ b/objects/screen.c @@ -99,12 +99,6 @@ screen_wipe(screen_t *s) screen_output_array_wipe(&s->outputs); } -void -luaA_pushscreen(lua_State *L, screen_t *s) -{ - luaA_object_push(L, s); -} - /** Get a screen argument from the lua stack */ screen_t * luaA_checkscreen(lua_State *L, int sidx) @@ -501,7 +495,7 @@ screen_client_moveto(client_t *c, screen_t *new_screen, bool doresize) { luaA_object_push(L, c); if(old_screen != NULL) - luaA_pushscreen(L, old_screen); + luaA_object_push(L, old_screen); else lua_pushnil(L); luaA_object_emit_signal(L, -2, "property::screen", 1); @@ -540,7 +534,7 @@ screen_client_moveto(client_t *c, screen_t *new_screen, bool doresize) { luaA_object_push(L, c); if(old_screen != NULL) - luaA_pushscreen(L, old_screen); + luaA_object_push(L, old_screen); else lua_pushnil(L); luaA_object_emit_signal(L, -2, "property::screen", 1); @@ -658,7 +652,7 @@ luaA_screen_module_call(lua_State *L) idx = screen_get_index(luaA_checkscreen(L, 3)); if (idx >= 0 && idx < globalconf.screens.len) /* No +1 needed, index starts at 1, C array at 0 */ - luaA_pushscreen(L, globalconf.screens.tab[idx]); + luaA_object_push(L, globalconf.screens.tab[idx]); else lua_pushnil(L); return 1; diff --git a/objects/screen.h b/objects/screen.h index 28ecf6b2..d6e6149f 100644 --- a/objects/screen.h +++ b/objects/screen.h @@ -50,7 +50,6 @@ void screen_client_moveto(client_t *, screen_t *, bool); void screen_update_primary(void); screen_t *screen_get_primary(void); -void luaA_pushscreen(lua_State *, screen_t *); screen_t *luaA_checkscreen(lua_State *, int); #endif