module/river: return empty particle list when river is not running

Closes #384
This commit is contained in:
Daniel Eklöf 2024-05-20 09:33:45 +02:00
parent 70efd7d15c
commit 0bea49b75e
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 15 additions and 0 deletions

View file

@ -15,6 +15,13 @@
## Unreleased
### Added
### Changed
* `river`: expand to an empty list of particles when river is not
running ([#384][384]).
[384]: https://codeberg.org/dnkl/yambar/issues/384
### Deprecated
### Removed
### Fixed

View file

@ -52,6 +52,7 @@ struct seat {
struct private
{
struct module *mod;
bool is_running;
struct zxdg_output_manager_v1 *xdg_output_manager;
struct zriver_status_manager_v1 *status_manager;
struct particle *template;
@ -88,6 +89,11 @@ content(struct module *mod)
mtx_lock(&m->mod->lock);
if (!m->is_running) {
mtx_unlock(&m->mod->lock);
return dynlist_exposable_new(NULL, 0, 0, 0);
}
uint32_t urgent = 0;
uint32_t occupied = 0;
uint32_t output_focused = 0;
@ -685,6 +691,8 @@ run(struct module *mod)
goto out;
}
m->is_running = true;
wl_display_roundtrip(display);
while (true) {