Also track opacity for unattached wibox

Before this, setting w.opacity of a wibox that was not attached to some screen
had no effect, now this is cached and applied when the wibox is attached to
some screen.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2009-05-25 15:26:16 +02:00 committed by Julien Danjou
parent c56453347e
commit a264acb1f0
1 changed files with 4 additions and 0 deletions

View File

@ -437,6 +437,9 @@ wibox_attach(screen_t *s)
simplewindow_cursor_set(&wibox->sw, simplewindow_cursor_set(&wibox->sw,
xcursor_new(globalconf.connection, xcursor_font_fromstr(wibox->cursor))); xcursor_new(globalconf.connection, xcursor_font_fromstr(wibox->cursor)));
simplewindow_opacity_set(&wibox->sw, wibox->sw.opacity);
if(wibox->isvisible) if(wibox->isvisible)
wibox_map(wibox); wibox_map(wibox);
else else
@ -481,6 +484,7 @@ luaA_wibox_new(lua_State *L)
w->ontop = luaA_getopt_boolean(L, 2, "ontop", false); w->ontop = luaA_getopt_boolean(L, 2, "ontop", false);
w->sw.opacity = -1;
w->sw.border.width = luaA_getopt_number(L, 2, "border_width", 0); w->sw.border.width = luaA_getopt_number(L, 2, "border_width", 0);
w->sw.geometry.x = luaA_getopt_number(L, 2, "x", 0); w->sw.geometry.x = luaA_getopt_number(L, 2, "x", 0);
w->sw.geometry.y = luaA_getopt_number(L, 2, "y", 0); w->sw.geometry.y = luaA_getopt_number(L, 2, "y", 0);