From 94a0154c2315fa22985ddbff5aebef3d43e260ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sun, 17 Oct 2021 16:48:09 +0200 Subject: [PATCH] bar: refresh before starting the main loop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This ensures the bar surface gets mapped, and a background + border rendered, even though no module “refreshes” it during initialization. Closes #116 --- CHANGELOG.md | 4 ++++ bar/bar.c | 1 + 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ea91e2..6990b6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ ### Added * ramp: can now have custom min and max values (https://codeberg.org/dnkl/yambar/issues/103). + + ### Changed * Made `libmpdclient` an optional dependency @@ -29,6 +31,8 @@ affected the “backlight”, “battery” and “removables” modules (https://codeberg.org/dnkl/yambar/issues/109). * foreign-toplevel: update bar when a top-level is closed. +* Bar not being mapped on an output before at least one module has + “refreshed” it (https://codeberg.org/dnkl/yambar/issues/116). ### Security diff --git a/bar/bar.c b/bar/bar.c index 2399368..8b19a43 100644 --- a/bar/bar.c +++ b/bar/bar.c @@ -323,6 +323,7 @@ run(struct bar *_bar) LOG_DBG("all modules started"); + refresh(_bar); bar->backend.iface->loop(_bar, &expose, &on_mouse); LOG_DBG("shutting down");