From 98fe5873167b9790cc939715bb155a1361d0a7b1 Mon Sep 17 00:00:00 2001 From: Scoopta Date: Mon, 6 Apr 2020 15:00:14 -0700 Subject: [PATCH] Fixed expanders not shrinking back to their original size --- src/wofi.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/wofi.c b/src/wofi.c index 9972e07..d3d1c54 100644 --- a/src/wofi.c +++ b/src/wofi.c @@ -441,6 +441,12 @@ static void update_surface_size(void) { static void widget_allocate(GtkWidget* widget, GdkRectangle* allocation, gpointer data) { (void) data; + if(GTK_IS_FLOW_BOX_CHILD(widget)) { + GtkWidget* expander = gtk_bin_get_child(GTK_BIN(widget)); + if(GTK_IS_EXPANDER(expander) && gtk_expander_get_expanded(GTK_EXPANDER(expander))) { + return; + } + } if(max_height > 0) { if(allocation->height > max_height) { int64_t ratio = allocation->height / max_height;