*
* Copyright (c) Tuomo Valkonen 1999-2007.
*
- * Ion is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; either version 2.1 of the License, or
- * (at your option) any later version.
+ * See the included file LICENSE for details.
*/
#include <string.h>
if(!extl_table_gets_s(tab, "type", &objclass))
return NULL;
-
- /* Backwards compatibility hack. */
- if(strcmp(objclass, "WFloatWS")==0){
- objclass=scopy("WGroupWS");
- }else if(strcmp(objclass, "WIonWS")==0){
- WGroupWS *ws=create_groupws(par, fp);
- if(ws!=NULL){
- extl_table_gets_s(tab, "name", &name);
- extl_table_sets_s(tab, "type", "WTiling");
- extl_table_sets_b(tab, "bottom", TRUE);
- extl_table_sets_b(tab, "bottom_last_close", TRUE);
- extl_table_sets_i(tab, "sizepolicy", SIZEPOLICY_FULL_EXACT);
-
- if(name!=NULL)
- region_set_name((WRegion*)ws, name);
-
- reg=group_attach_new((WGroup*)ws, tab);
-
- if(reg!=NULL)
- return (WRegion*)ws;
-
- destroy_obj((Obj*)ws);
- }
- objclass=scopy("WTiling");
- }else if(strcmp(objclass, "WFloatFrame")==0){
- objclass=scopy("WFrame");
- }
if(objclass==NULL)
return NULL;
}
+static bool get_config_clientwins=TRUE;
+
+
ExtlTab region_get_configuration(WRegion *reg)
{
ExtlTab tab=extl_table_none();
- CALL_DYN_RET(tab, ExtlTab, region_get_configuration, reg, (reg));
+ if(get_config_clientwins || !OBJ_IS(reg, WClientWin)){
+ CALL_DYN_RET(tab, ExtlTab, region_get_configuration, reg, (reg));
+ }
+ return tab;
+}
+
+
+/*EXTL_DOC
+ * Get configuration tree. If \var{clientwins} is unset, client windows
+ * are filtered out.
+ */
+EXTL_EXPORT_AS(WRegion, get_configuration)
+ExtlTab region_get_configuration_extl(WRegion *reg, bool clientwins)
+{
+ ExtlTab tab;
+
+ get_config_clientwins=clientwins;
+
+ tab=region_get_configuration(reg);
+
+ get_config_clientwins=TRUE;
+
return tab;
}