+ if(group_bottom(ws)==reg){
+ if(group_empty_for_bottom_stdisp(ws))
+ return region_disposeroot((WRegion*)ws);
+ }
+
+ return reg;
+}
+
+
+/*}}}*/
+
+
+/*{{{ Bottom */
+
+
+static void group_do_set_bottom(WGroup *grp, WStacking *st)
+{
+ WStacking *was=grp->bottom;
+
+ grp->bottom=st;
+
+ if(st!=was){
+ if(st==NULL || HAS_DYN(st->reg, region_manage_stdisp))
+ group_remanage_stdisp(grp);
+
+ }
+}
+
+
+/*EXTL_DOC
+ * Sets the `bottom' of \var{ws}. The region \var{reg} must already
+ * be managed by \var{ws}, unless \code{nil}.
+ */
+EXTL_EXPORT_MEMBER
+bool group_set_bottom(WGroup *ws, WRegion *reg)
+{
+ WStacking *st=NULL;
+
+ if(reg!=NULL){
+ st=group_find_stacking(ws, reg);
+
+ if(st==NULL)
+ return FALSE;
+ }
+
+ group_do_set_bottom(ws, st);
+