[client] Check that tag and client are on the same screen

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-05-25 12:06:10 +02:00
parent 1d8481fc9e
commit c9fde5a9f0
1 changed files with 5 additions and 0 deletions

View File

@ -937,10 +937,15 @@ luaA_client_tag(lua_State *L)
client_t **c = luaL_checkudata(L, 1, "client");
tag_t **tag = luaL_checkudata(L, 2, "tag");
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)
tag_client(*c, *tag);
else
untag_client(*c, *tag);
return 0;
}