tag: allow view only if tag has a screen

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-08-11 18:18:17 +02:00
parent e5c38ad17f
commit abd0216194
1 changed files with 2 additions and 1 deletions

1
tag.c
View File

@ -480,6 +480,7 @@ luaA_tag_newindex(lua_State *L)
luaL_error(L, "unknown layout: %s", buf); luaL_error(L, "unknown layout: %s", buf);
break; break;
case A_TK_SELECTED: case A_TK_SELECTED:
if((*tag)->screen != SCREEN_UNDEF)
tag_view(*tag, luaA_checkboolean(L, 3)); tag_view(*tag, luaA_checkboolean(L, 3));
return 0; return 0;
case A_TK_MWFACT: case A_TK_MWFACT: