From c9fde5a9f069fee25b5264110cd4ff71d133eea8 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Sun, 25 May 2008 12:06:10 +0200 Subject: [PATCH] [client] Check that tag and client are on the same screen Signed-off-by: Julien Danjou --- client.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/client.c b/client.c index 8b2c6ffa..3b55d1dc 100644 --- a/client.c +++ b/client.c @@ -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; }