[client] Check that tag and client are on the same screen
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
1d8481fc9e
commit
c9fde5a9f0
5
client.c
5
client.c
|
@ -937,10 +937,15 @@ luaA_client_tag(lua_State *L)
|
||||||
client_t **c = luaL_checkudata(L, 1, "client");
|
client_t **c = luaL_checkudata(L, 1, "client");
|
||||||
tag_t **tag = luaL_checkudata(L, 2, "tag");
|
tag_t **tag = luaL_checkudata(L, 2, "tag");
|
||||||
bool tag_the_client = luaA_checkboolean(L, 3);
|
bool tag_the_client = luaA_checkboolean(L, 3);
|
||||||
|
|
||||||
|
if((*tag)->screen != (*c)->screen)
|
||||||
|
luaL_error(L, "tag and client are on different screens");
|
||||||
|
|
||||||
if(tag_the_client)
|
if(tag_the_client)
|
||||||
tag_client(*c, *tag);
|
tag_client(*c, *tag);
|
||||||
else
|
else
|
||||||
untag_client(*c, *tag);
|
untag_client(*c, *tag);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue