Use the new simplewindow functions for managing a wibox' opacity
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
56fae6ede1
commit
6b5e5f352c
8
wibox.c
8
wibox.c
|
@ -645,8 +645,8 @@ luaA_wibox_index(lua_State *L)
|
||||||
break;
|
break;
|
||||||
case A_TK_OPACITY:
|
case A_TK_OPACITY:
|
||||||
{
|
{
|
||||||
double d;
|
double d = simplewindow_opacity_get(&wibox->sw);
|
||||||
if ((d = window_opacity_get(wibox->sw.window)) >= 0)
|
if (d >= 0)
|
||||||
lua_pushnumber(L, d);
|
lua_pushnumber(L, d);
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -857,12 +857,12 @@ luaA_wibox_newindex(lua_State *L)
|
||||||
break;
|
break;
|
||||||
case A_TK_OPACITY:
|
case A_TK_OPACITY:
|
||||||
if(lua_isnil(L, 3))
|
if(lua_isnil(L, 3))
|
||||||
window_opacity_set(wibox->sw.window, -1);
|
simplewindow_opacity_set(&wibox->sw, -1);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
double d = luaL_checknumber(L, 3);
|
double d = luaL_checknumber(L, 3);
|
||||||
if(d >= 0 && d <= 1)
|
if(d >= 0 && d <= 1)
|
||||||
window_opacity_set(wibox->sw.window, d);
|
simplewindow_opacity_set(&wibox->sw, d);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case A_TK_MOUSE_ENTER:
|
case A_TK_MOUSE_ENTER:
|
||||||
|
|
Loading…
Reference in New Issue