From 4e06b4af4012bb6185ab914bd515b36d0aef41d4 Mon Sep 17 00:00:00 2001 From: Rutherther Date: Mon, 22 Jul 2024 20:28:21 +0200 Subject: [PATCH] fix: move scratch to monitor if needed --- dwl.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/dwl.c b/dwl.c index 27cbee3..2cd447b 100644 --- a/dwl.c +++ b/dwl.c @@ -1461,7 +1461,10 @@ 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); } @@ -1506,7 +1509,10 @@ 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); -- 2.48.1