- if (at[i] == server.atom._NET_WM_STATE_MODAL) {
- // do not add modal windows if the transient window is already in the taskbar
- if ( XGetTransientForHint(server.dsp, win, &window) && task_get_tasks(window) ) {
+ // do not add transient_for windows if the transient window is already in the taskbar
+ window=win;
+ while ( XGetTransientForHint(server.dsp, window, &window) ) {
+ if ( task_get_tasks(window) ) {