wibox: check if a wibox' window exists before modifying it
If you change the .bg of an existing wibox which isn't attached to any screen yet, then there is no window for which we can update the XCB_CW_BACK_PIXEL. Signed-off-by: Uli Schlachter <psychon@znc.in> Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
056d9a074b
commit
a44da9fe8e
|
@ -1010,6 +1010,8 @@ luaA_wibox_set_bg(lua_State *L, wibox_t *wibox)
|
|||
uint32_t values[] = { wibox->ctx.bg.pixel };
|
||||
|
||||
wibox->need_update = true;
|
||||
|
||||
if (wibox->window != XCB_NONE)
|
||||
xcb_change_window_attributes(globalconf.connection,
|
||||
wibox->window,
|
||||
mask,
|
||||
|
|
Loading…
Reference in New Issue