mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-19 19:25:41 +02:00
module/river: return empty particle list when river is not running
Closes #384
This commit is contained in:
parent
70efd7d15c
commit
0bea49b75e
2 changed files with 15 additions and 0 deletions
|
@ -15,6 +15,13 @@
|
||||||
## Unreleased
|
## Unreleased
|
||||||
### Added
|
### Added
|
||||||
### Changed
|
### 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
|
### Deprecated
|
||||||
### Removed
|
### Removed
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
|
@ -52,6 +52,7 @@ struct seat {
|
||||||
struct private
|
struct private
|
||||||
{
|
{
|
||||||
struct module *mod;
|
struct module *mod;
|
||||||
|
bool is_running;
|
||||||
struct zxdg_output_manager_v1 *xdg_output_manager;
|
struct zxdg_output_manager_v1 *xdg_output_manager;
|
||||||
struct zriver_status_manager_v1 *status_manager;
|
struct zriver_status_manager_v1 *status_manager;
|
||||||
struct particle *template;
|
struct particle *template;
|
||||||
|
@ -88,6 +89,11 @@ content(struct module *mod)
|
||||||
|
|
||||||
mtx_lock(&m->mod->lock);
|
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 urgent = 0;
|
||||||
uint32_t occupied = 0;
|
uint32_t occupied = 0;
|
||||||
uint32_t output_focused = 0;
|
uint32_t output_focused = 0;
|
||||||
|
@ -685,6 +691,8 @@ run(struct module *mod)
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m->is_running = true;
|
||||||
|
|
||||||
wl_display_roundtrip(display);
|
wl_display_roundtrip(display);
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue