titlebar: add position in __newindex
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
bfad5a0d0d
commit
cde948bd61
12
titlebar.c
12
titlebar.c
|
@ -362,6 +362,7 @@ luaA_titlebar_newindex(lua_State *L)
|
|||
client_t *c = NULL, **newc;
|
||||
int i;
|
||||
widget_node_t *witer;
|
||||
position_t position;
|
||||
|
||||
switch(a_tokenize(attr, len))
|
||||
{
|
||||
|
@ -455,6 +456,17 @@ luaA_titlebar_newindex(lua_State *L)
|
|||
lua_pop(L, 1);
|
||||
}
|
||||
break;
|
||||
case A_TK_POSITION:
|
||||
buf = luaL_checklstring(L, 3, &len);
|
||||
position = position_fromstr(buf, len);
|
||||
if(position != (*titlebar)->position)
|
||||
{
|
||||
(*titlebar)->position = position;
|
||||
c = client_getbytitlebar(*titlebar);
|
||||
simplewindow_delete(&c->titlebar->sw);
|
||||
titlebar_init(c);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue