e - fix stacking of transients to be in newness order bottom to top

so a parent transient shows 2 dialogs... both are transient for the
parent. the newsewst one gets stacked below the older one. this leads
to really bad things like a new "are you sure" or "have an error"
modal dialog is not visible and things seemingly freeze in the
client... so stack them in order they are created instead. also handle
transients WITH transients of their own correctly this way too.

@fix
This commit is contained in:
Carsten Haitzler 2019-06-03 12:46:09 +01:00
parent 61d45313c4
commit 540db8bd41
1 changed files with 14 additions and 2 deletions

View File

@ -5718,7 +5718,7 @@ E_API void
e_client_transients_restack(E_Client *ec)
{
Eina_List *list;
E_Client *child, *below = NULL;
E_Client *child, *below = NULL, *last;
E_OBJECT_CHECK(ec);
E_OBJECT_TYPE_CHECK(ec, E_CLIENT_TYPE);
@ -5732,7 +5732,19 @@ e_client_transients_restack(E_Client *ec)
*/
if (child->iconic) continue;
if (below)
evas_object_stack_below(child->frame, below->frame);
{
if (below->transients)
{
e_client_transients_restack(below);
last = eina_list_last_data_get(below->transients);
if (last)
evas_object_stack_above(child->frame, last->frame);
else
evas_object_stack_above(child->frame, below->frame);
}
else
evas_object_stack_above(child->frame, below->frame);
}
else
evas_object_stack_above(child->frame, ec->frame);
below = child;