screen: move screen.focus to awful
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
81ae462a70
commit
4016877ad4
|
@ -173,7 +173,8 @@ function P.screen.focus(i)
|
|||
s = mouse.screen
|
||||
end
|
||||
s = cycle(screen.count(), s + i)
|
||||
screen.focus(s)
|
||||
local vc = client.visible_get(s)
|
||||
if #vc > 0 then vc[1]:focus_set() end
|
||||
-- Move the mouse on the screen
|
||||
mouse.coords = screen.coords_get(s)
|
||||
end
|
||||
|
|
18
lua.c
18
lua.c
|
@ -169,23 +169,6 @@ luaA_screen_count(lua_State *L)
|
|||
return 1;
|
||||
}
|
||||
|
||||
/** Give the focus to a screen.
|
||||
* \param L The Lua VM state.
|
||||
* \return The number of elements pushed on stack.
|
||||
*
|
||||
* \luastack
|
||||
* \lparam A screen number
|
||||
*/
|
||||
static int
|
||||
luaA_screen_focus(lua_State *L)
|
||||
{
|
||||
/* Our table begin at 0, Lua begins at 1 */
|
||||
int screen = luaL_checknumber(L, 1) - 1;
|
||||
luaA_checkscreen(screen);
|
||||
client_focus(NULL, screen);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** Return screen coordinates.
|
||||
* \param L The Lua VM state.
|
||||
* \return The number of elements pushed on stack.
|
||||
|
@ -476,7 +459,6 @@ luaA_init(void)
|
|||
{ "coords_get", luaA_screen_coords_get },
|
||||
{ "workspace_get", luaA_screen_workspace_get },
|
||||
{ "count", luaA_screen_count },
|
||||
{ "focus", luaA_screen_focus },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
static const struct luaL_reg awesome_hooks_lib[] =
|
||||
|
|
Loading…
Reference in New Issue