static void _add_client(E_Client *ec);
static void _remove_client(E_Client *ec);
+static void _client_apply_settings(E_Client *ec, Client_Extra *extra);
static void _foreach_desk(void (*func)(E_Desk *desk));
/* Func Proto Requirements for Gadcon */
E_Comp *c;
E_Zone *z;
E_Desk *d;
- int new_nb_stacks = newconf->nb_stacks;
+ int old_nb_stacks, new_nb_stacks = newconf->nb_stacks;
m = e_manager_current_get();
if (!m)
return;
check_tinfo(d);
+ old_nb_stacks = _G.tinfo->conf->nb_stacks;
+
_G.tinfo->conf = newconf;
_G.tinfo->conf->nb_stacks = new_nb_stacks;
_G.tinfo->tree = NULL;
e_place_zone_region_smart_cleanup(z);
}
+ else if (new_nb_stacks == old_nb_stacks)
+ {
+ E_Client *ec;
+
+ E_CLIENT_FOREACH(e_comp_get(NULL), ec)
+ {
+ _client_apply_settings(ec, NULL);
+ }
+
+ _reapply_tree();
+ }
else
{
/* Add all the existing windows. */
/* Reorganize windows {{{ */
static void
+_client_apply_settings(E_Client *ec, Client_Extra *extra)
+{
+ if (!extra)
+ {
+ extra = tiling_entry_func(ec);
+ }
+
+ if (!extra)
+ return;
+
+ if (is_ignored_window(extra))
+ return;
+
+ if (!extra->tiled)
+ return;
+
+ if (ec->maximized)
+ _e_client_unmaximize(ec, E_MAXIMIZE_BOTH);
+
+ if (!tiling_g.config->show_titles && (!ec->bordername ||
+ strcmp(ec->bordername, "pixel")))
+ change_window_border(ec, "pixel");
+ else if (tiling_g.config->show_titles && (ec->bordername &&
+ !strcmp(ec->bordername, "pixel")))
+ change_window_border(ec, (extra->orig.bordername) ? extra->orig.bordername : "default");
+
+}
+
+static void
_add_client(E_Client *ec)
{
/* Should I need to check that the client is not already added? */
DBG("adding %p", ec);
- if (ec->maximized)
- _e_client_unmaximize(ec, E_MAXIMIZE_BOTH);
-
- if (!tiling_g.config->show_titles && (!ec->bordername ||
- strcmp(ec->bordername, "pixel")))
- change_window_border(ec, "pixel");
+ _client_apply_settings(ec, extra);
/* Window tree updating. */
{