diff --git a/bar.c b/bar.c index 13b2ba5..8226325 100644 --- a/bar.c +++ b/bar.c @@ -171,6 +171,8 @@ expose(const struct bar *_bar) } } +static void refresh(const struct bar *bar); + static int run(struct bar_run_context *run_ctx) { @@ -428,6 +430,8 @@ run(struct bar_run_context *run_ctx) close(ready_fd); LOG_DBG("all modules started"); + refresh(_bar); + int fd = xcb_get_file_descriptor(bar->conn); while (true) { diff --git a/modules/xkb/xkb.c b/modules/xkb/xkb.c index a91f406..7274493 100644 --- a/modules/xkb/xkb.c +++ b/modules/xkb/xkb.c @@ -384,7 +384,6 @@ static bool talk_to_xkb(struct module_run_context *ctx, xcb_connection_t *conn) { struct private *m = ctx->module->private; - const struct bar *bar = ctx->module->bar; if (!xkb_enable(conn)) goto err; @@ -412,7 +411,6 @@ talk_to_xkb(struct module_run_context *ctx, xcb_connection_t *conn) m->layouts = layouts; m->current = current; - bar->refresh(bar); module_signal_ready(ctx); return event_loop(ctx, conn, xkb_event_base); diff --git a/modules/xwindow/xwindow.c b/modules/xwindow/xwindow.c index ed42962..400f07f 100644 --- a/modules/xwindow/xwindow.c +++ b/modules/xwindow/xwindow.c @@ -14,6 +14,8 @@ #include #include +#define LOG_MODULE "xkb" +#include "../../log.h" #include "../../bar.h" #include "../../xcb.h" @@ -212,7 +214,6 @@ run(struct module_run_context *ctx) update_active_window(m); update_application(mod); update_title(mod); - mod->bar->refresh(mod->bar); module_signal_ready(ctx);