statusbar: don't refresh screen if statusbar is not assigned one.

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Kanru Chen 2008-08-12 14:22:37 +08:00 committed by Julien Danjou
parent d310605a64
commit 4ceb4e8bde
1 changed files with 6 additions and 3 deletions

View File

@ -640,10 +640,13 @@ luaA_statusbar_newindex(lua_State *L)
if(p != (*statusbar)->position) if(p != (*statusbar)->position)
{ {
(*statusbar)->position = p; (*statusbar)->position = p;
if((*statusbar)->screen != SCREEN_UNDEF)
{
for(s = globalconf.screens[(*statusbar)->screen].statusbar; s; s = s->next) for(s = globalconf.screens[(*statusbar)->screen].statusbar; s; s = s->next)
statusbar_position_update(s); statusbar_position_update(s);
ewmh_update_workarea((*statusbar)->phys_screen); ewmh_update_workarea((*statusbar)->phys_screen);
} }
}
break; break;
case A_TK_WIDGETS: case A_TK_WIDGETS:
luaA_checktable(L, 3); luaA_checktable(L, 3);