From 7dae26a1622d49d3546c560fe7c71cd1aafe824d Mon Sep 17 00:00:00 2001 From: Marco Peereboom Date: Tue, 29 Sep 2009 22:35:02 +0000 Subject: [PATCH] Make sure we open transient in same ws as parent; this does not work 100% on intel xrandr. It seems that the intel driver switched the geometry so that 0.0 isnt in the top left corner or something. --- scrotwm.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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; -- 1.7.10.4