screen: only warn if no tag left

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-11-07 11:19:26 +01:00
parent f45c3dd641
commit 6766fcfefa
1 changed files with 3 additions and 1 deletions

View File

@ -460,8 +460,10 @@ luaA_screen_tags(lua_State *L)
/* check there's at least one tag! */ /* check there's at least one tag! */
if(!s->tags.len) if(!s->tags.len)
{ {
luaA_warn(L, "screen %d has no tag, taking last resort action and adding default tag\n",
s->index);
tag_append_to_screen(tag_new("default", sizeof("default") - 1, layout_tile, 0.5, 1, 0), s); tag_append_to_screen(tag_new("default", sizeof("default") - 1, layout_tile, 0.5, 1, 0), s);
luaL_error(L, "no tag were added on screen %d, taking last resort action and adding default tag\n", s->index); return 1;
} }
} }
else else