path: root/endless
diff options
authorMatt Watson <>2013-10-31 01:13:58 -0700
committerMatt Watson <>2013-12-05 13:10:52 -0800
commit17c370404b9fb8fe9512320397ce0b111f35f098 (patch)
treedb29933833f76d178a48478dbf9bf9297f87e375 /endless
parentad771d5c90c36970ff7e60ee631c19753d67a41d (diff)
Fixed size request of eos-window
Since the entire main area of the window is actually in the "over" layer of an overlay, we needed a size group to make sure the background widget underneath had the right size request. [endlessm/eos-sdk#376]
Diffstat (limited to 'endless')
1 files changed, 8 insertions, 0 deletions
diff --git a/endless/eoswindow.c b/endless/eoswindow.c
index cd0fe68..4e247db 100644
--- a/endless/eoswindow.c
+++ b/endless/eoswindow.c
@@ -67,6 +67,7 @@ struct _EosWindowPrivate
GtkWidget *top_bar;
GtkWidget *main_area;
GtkWidget *overlay;
+ GtkSizeGroup *overlay_size_group;
GtkWidget *edge_finishing;
GtkWidget *current_background;
GtkWidget *next_background;
@@ -657,6 +658,13 @@ eos_window_init (EosWindow *self)
self->priv->main_area = eos_main_area_new ();
gtk_overlay_add_overlay (GTK_OVERLAY (self->priv->overlay), self->priv->main_area);
+ // We want the overlay to size to the main area, the widget on top. The
+ // overlay gets its size request from the widget on the bottom, the
+ // background frame with no minimum size. So we use a size group.
+ self->priv->overlay_size_group = gtk_size_group_new (GTK_SIZE_GROUP_BOTH);
+ gtk_size_group_add_widget (self->priv->overlay_size_group, self->priv->background_stack);
+ gtk_size_group_add_widget (self->priv->overlay_size_group, self->priv->main_area);
self->priv->edge_finishing = gtk_drawing_area_new ();
gtk_widget_set_vexpand (self->priv->edge_finishing, FALSE);
gtk_widget_set_valign (self->priv->edge_finishing, GTK_ALIGN_START);