From 3787e1d356af7f59f6f096e2125233ab29617862 Mon Sep 17 00:00:00 2001 From: wochap Date: Mon, 8 Apr 2024 16:36:56 -0500 Subject: [PATCH] fix: move window to focused monitor if necessary --- dwl.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/dwl.c b/dwl.c index 4c40f86..4786f12 100644 --- a/dwl.c +++ b/dwl.c @@ -2520,7 +2520,11 @@ focusortogglescratch(const Arg *arg) } } else { // show - c->tags = selmon->tagset[selmon->seltags]; + if (c->mon == selmon) { + c->tags = selmon->tagset[selmon->seltags]; + } else { + setmon(c, selmon, 0); + } focusclient(c, 1); } arrange(selmon); @@ -2560,7 +2564,11 @@ focusortogglematchingscratch(const Arg *arg) } } else { // show - c->tags = selmon->tagset[selmon->seltags]; + if (c->mon == selmon) { + c->tags = selmon->tagset[selmon->seltags]; + } else { + setmon(c, selmon, 0); + } // focus focusclient(c, 1); } -- 2.48.1