From a264acb1f01f5a9d55b9db7c544b9f4f7b653210 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Mon, 25 May 2009 15:26:16 +0200 Subject: [PATCH] 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 --- wibox.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wibox.c b/wibox.c index 2d623810..69009c9e 100644 --- a/wibox.c +++ b/wibox.c @@ -437,6 +437,9 @@ wibox_attach(screen_t *s) simplewindow_cursor_set(&wibox->sw, xcursor_new(globalconf.connection, xcursor_font_fromstr(wibox->cursor))); + + simplewindow_opacity_set(&wibox->sw, wibox->sw.opacity); + if(wibox->isvisible) wibox_map(wibox); else @@ -481,6 +484,7 @@ luaA_wibox_new(lua_State *L) 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.geometry.x = luaA_getopt_number(L, 2, "x", 0); w->sw.geometry.y = luaA_getopt_number(L, 2, "y", 0);