diff options
Diffstat (limited to 'source/widgets/box.c')
-rw-r--r-- | source/widgets/box.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/widgets/box.c b/source/widgets/box.c index 605ec0ce..42f95f4e 100644 --- a/source/widgets/box.c +++ b/source/widgets/box.c @@ -329,6 +329,14 @@ static widget *box_find_mouse_target ( widget *wid, WidgetType type, gint x, gin return NULL; } +static void box_set_state ( widget *wid, const char *state ) +{ + for ( GList *iter = g_list_first ( ((box*)wid)->children ); iter != NULL; iter = g_list_next ( iter ) ) { + widget * child = (widget *) iter->data; + widget_set_state ( child, state ); + } +} + box * box_create ( widget *parent, const char *name, RofiOrientation type ) { box *b = g_malloc0 ( sizeof ( box ) ); @@ -342,6 +350,7 @@ box * box_create ( widget *parent, const char *name, RofiOrientation type ) b->widget.find_mouse_target = box_find_mouse_target; b->widget.get_desired_height = box_get_desired_height; b->widget.get_desired_width = box_get_desired_width; + b->widget.set_state = box_set_state; b->type = rofi_theme_get_orientation ( WIDGET ( b ), "orientation", b->type ); |