From 7e102279368fc035a33e066ba6dfff3bd909b1f9 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Tue, 3 Jun 2014 22:03:01 -0700 Subject: [PATCH] Keep regexp clients on the same screen when attaching to new view. --- cmd/wmii/view.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/wmii/view.c b/cmd/wmii/view.c index 780442f6..4aa3d299 100644 --- a/cmd/wmii/view.c +++ b/cmd/wmii/view.c @@ -417,6 +417,7 @@ view_attach(View *v, Frame *f) { oldsel = v->oldsel; a = v->sel; + if(c->floating == Never) a = view_findarea(v, v->selscreen, v->selcol, false); else if(client_floats_p(c)) { @@ -424,6 +425,9 @@ view_attach(View *v, Frame *f) { oldsel = v->sel; a = v->floating; } + else if(c->sel && c->sel->screen >= 0 && c->sel->screen < nscreens_new && + c->sel->screen != v->sel->screen) + a = view_findarea(v, c->sel->screen, 0, false); else if((ff = client_groupframe(c, v))) { if (ff->client != c && ff->area->screen < nscreens_new) a = ff->area;