elkowar/eww · warning
Error, trying to add multiple children to a…
Error message
Error, trying to add multiple children to a circular-progress widget
What it means
Circular-progress is a GTK container subclass that accepts at most one child (the content widget). Its ContainerImpl::add checks whether content is already set; if so, it prints this error and removes the previous child rather than stacking widgets.
Solutions
- Keep exactly one child inside the circular-progress widget in your config
- Wrap multiple children in a `box` if you need a composite layout inside (though circular-progress expects a single content child)
- Check custom widget definitions that might add extra children
Example fix
; before
(circular-progress
(label :text "a")
(label :text "b"))
; after
(circular-progress
(box :orientation "v"
(label :text "a")
(label :text "b"))) Defensive patterns
Strategy: validation
Validate before calling
// ensure a single child before population
if children.len() > 1 {
return Err(anyhow!("circular-progress accepts exactly one child"));
} Try / catch
// treat as non-fatal: handler already prints and removes the old child // ensure your config doesn't rely on multi-child behavior
Prevention
- Give circular-progress exactly one child
- Wrap composite layouts in a box inside the widget
- Audit custom widgets that expand into circular-progress
When it happens
Trigger: The widget definition for a circular-progress contains two or more child widgets, so populate_widget_children calls add() a second time on the same instance.
Common situations: Accidentally leaving two children in the circular-progress element in yuck; a custom widget expansion that injects an extra child; refactoring a box into circular-progress without removing extra children.
Understand the failure class
Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.
Related errors
- Script var ' ' is not polling
- CSS error
- The script for the ` `-variable exited unsuccessfully
- Encountered both an SCSS and CSS file. Only one of these…
- SCSS parsing error
AI-assisted analysis of elkowar/eww@48f5aa8b37 (2026-09-08).
Data as JSON: /api/errors/b099bc53bbdee510.
Report an issue: GitHub.
Appendix: source
Thrown at crates/eww/src/widgets/circular_progressbar.rs:101
}
impl Default for CircProg {
fn default() -> Self {
Self::new()
}
}
impl CircProg {
pub fn new() -> Self {
glib::Object::new::<Self>()
}
}
impl ContainerImpl for CircProgPriv {
fn add(&self, widget: >k::Widget) {
if let Some(content) = &*self.content.borrow() {
// TODO: Handle this error when populating children widgets instead
error_handling_ctx::print_error(anyhow!("Error, trying to add multiple children to a circular-progress widget"));
self.parent_remove(content);
}
self.parent_add(widget);
self.content.replace(Some(widget.clone()));
}
}
fn calc_widget_lowest_preferred_dimension(widget: >k::Widget) -> (i32, i32) {
let preferred_width = widget.preferred_width();
let preferred_height = widget.preferred_height();
let min_lowest = i32::min(preferred_width.0, preferred_height.0);
let natural_lowest = i32::min(preferred_width.1, preferred_height.1);
(min_lowest, natural_lowest)
}
impl BinImpl for CircProgPriv {}
impl WidgetImpl for CircProgPriv {View on GitHub (pinned to 48f5aa8b37)