diff -Naur a/src/netwm.c b/src/netwm.c --- a/src/netwm.c +++ b/src/netwm.c @@ -1202,6 +1202,11 @@ TRACE ("atom net_wm_window_type_dialog detected"); c->type = WINDOW_DIALOG; c->initial_layer = WIN_LAYER_NORMAL; + /* Treat DIALOG without transient_for set as transient for group */ + if (c->transient_for == None) + { + c->transient_for = c->screen_info->xroot; + } } else if (c->type_atom == display_info->atoms[NET_WM_WINDOW_TYPE_NORMAL]) { @@ -1216,6 +1221,11 @@ CLIENT_FLAG_SKIP_PAGER | CLIENT_FLAG_SKIP_TASKBAR); c->type = WINDOW_UTILITY; c->initial_layer = WIN_LAYER_NORMAL; + /* Treat UTILITY without transient_for set as transient for group */ + if (c->transient_for == None) + { + c->transient_for = c->screen_info->xroot; + } } else if (c->type_atom == display_info->atoms[NET_WM_WINDOW_TYPE_SPLASH]) { diff -Naur a/src/transients.c b/src/transients.c --- a/src/transients.c +++ b/src/transients.c @@ -107,10 +107,9 @@ { if (c1->transient_for != c1->screen_info->xroot) { - if (c1->transient_for == c2->window) return (c1->transient_for == c2->window); } - else if (c1->serial >= c2->serial) + else if (c2->transient_for != c2->screen_info->xroot) { return (clientSameGroup (c1, c2)); }