X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=scrotwm.c;h=0dda0108009746c316c72fb0aff97cb208047a8a;hb=597613109eb2103c3a196742ec04953b0996d6ae;hp=a3aba41b2fde35cfdb0067632004d8f774d78cc4;hpb=cecd90ba6a8888b45ba16952cffbec999199bba9;p=spectrwm.git diff --git a/scrotwm.c b/scrotwm.c index a3aba41..0dda010 100644 --- a/scrotwm.c +++ b/scrotwm.c @@ -3191,7 +3191,7 @@ manage_window(Window id) { Window trans; struct workspace *ws; - struct ws_win *win; + struct ws_win *win, *ww; int format, i, ws_idx, n; unsigned long nitems, bytes; Atom ws_idx_atom = 0, type; @@ -3244,8 +3244,17 @@ manage_window(Window id) errstr, prop); } ws = &r->s->ws[ws_idx]; - } else + } else { ws = r->ws; + /* this should launch transients in the same ws as parent */ + /* XXX doesn't work for intel xrandr */ + if (id && trans) { + if ((ww = find_window(trans)) != NULL) { + ws = ww->ws; + r = ws->r; + } + } + } /* set up the window layout */ win->id = id;