bar: do a synchronous “refresh” *before* starting the modules

This ensures the surface has been mapped, and our “current” output is
known.

This fixes an issue where modules depending on the current output
being known failed to update correctly during startup.
This commit is contained in:
Daniel Eklöf 2021-10-22 18:05:20 +02:00
parent 957e25914c
commit 4f3aa8c6b0
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -293,6 +293,7 @@ run(struct bar *_bar)
} }
set_cursor(_bar, "left_ptr"); set_cursor(_bar, "left_ptr");
expose(_bar);
/* Start modules */ /* Start modules */
thrd_t thrd_left[max(bar->left.count, 1)]; thrd_t thrd_left[max(bar->left.count, 1)];
@ -323,7 +324,6 @@ run(struct bar *_bar)
LOG_DBG("all modules started"); LOG_DBG("all modules started");
refresh(_bar);
bar->backend.iface->loop(_bar, &expose, &on_mouse); bar->backend.iface->loop(_bar, &expose, &on_mouse);
LOG_DBG("shutting down"); LOG_DBG("shutting down");