return NULL;
}
-static void calc_recursive(Client *self, StackLayer l, gboolean raised)
+static void calc_recursive(Client *self, Client *orig, StackLayer l,
+ gboolean raised)
{
StackLayer old;
GSList *it;
self->layer = l;
for (it = self->transients; it; it = it->next)
- calc_recursive(it->data, l, raised ? raised : l != old);
+ calc_recursive(it->data, orig, l, raised ? raised : l != old);
if (!raised && l != old)
- if (self->frame)
+ if (orig->frame) /* only restack if the original window is managed */
stacking_raise(self);
}
{
StackLayer l;
gboolean f;
+ Client *orig;
+
+ orig = self;
/* transients take on the layer of their parents */
if (self->transient_for) {
else if (self->below) l = Layer_Below;
else l = Layer_Normal;
- calc_recursive(self, l, FALSE);
+ calc_recursive(self, orig, l, FALSE);
}
gboolean client_should_show(Client *self)
/* raise transients first */
for (sit = client->transients; sit; sit = sit->next)
- if (((Client*)sit->data)->frame)
- raise_recursive(sit->data);
+ raise_recursive(sit->data);
/* find 'it' where it is the positiion in the stacking order where
'client' will be inserted *before* */