otherwise systray dies because window is destroyed. --- statusbar.c | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/statusbar.c b/statusbar.c index 85d3947..71430f2 100644 --- a/statusbar.c +++ b/statusbar.c @@ -272,9 +272,8 @@ statusbar_position_update(wibox_t *statusbar) if(statusbar->position == Off) { - xcb_unmap_window(globalconf.connection, statusbar->sw.window); - /* kick out systray if needed */ - statusbar_systray_refresh(statusbar); + /* Set need update */ + globalconf.screens[statusbar->screen].need_arrange = true; return; } @@ -567,8 +566,13 @@ luaA_statusbar_newindex(lua_State *L, wibox_t *statusbar, awesome_token_t tok) if(p != statusbar->position) { statusbar->position = p; - simplewindow_wipe(&statusbar->sw); - statusbar->sw.window = 0; + xcb_unmap_window(globalconf.connection, statusbar->sw.window); + statusbar_systray_kickout(statusbar->sw.ctx.phys_screen); + if(statusbar->sw.window) + { + simplewindow_wipe(&statusbar->sw); + statusbar->sw.window = 0; + } if(statusbar->screen != SCREEN_UNDEF) { for(int i = 0; i < globalconf.screens[statusbar->screen].statusbars.len; i++) -- 1.6.0.1 -- To unsubscribe, send mail to [EMAIL PROTECTED]