summaryrefslogtreecommitdiffstats
path: root/dwl-patches/patches/attachfocused/attachfocused.patch
diff options
context:
space:
mode:
authorLeonard Kugis <leonard@kug.is>2025-05-23 11:41:09 +0000
committerLeonard Kugis <leonard@kug.is>2025-05-23 11:41:09 +0000
commitc70505d7c7b7b48600f273357694b56ccf5d2a15 (patch)
tree21c27ac6ffced8d6d904e35bdb39baa5d685d829 /dwl-patches/patches/attachfocused/attachfocused.patch
downloaddotfiles-c70505d7c7b7b48600f273357694b56ccf5d2a15.tar.gz
dotfiles-c70505d7c7b7b48600f273357694b56ccf5d2a15.tar.bz2
dotfiles-c70505d7c7b7b48600f273357694b56ccf5d2a15.zip
Initial commitHEADmaster
Diffstat (limited to 'dwl-patches/patches/attachfocused/attachfocused.patch')
-rw-r--r--dwl-patches/patches/attachfocused/attachfocused.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/dwl-patches/patches/attachfocused/attachfocused.patch b/dwl-patches/patches/attachfocused/attachfocused.patch
new file mode 100644
index 0000000..2b8cd38
--- /dev/null
+++ b/dwl-patches/patches/attachfocused/attachfocused.patch
@@ -0,0 +1,29 @@
+From d03851c14073874f5b3d19a095e184dc24d219cd Mon Sep 17 00:00:00 2001
+From: MayOrMayNotBeACat <maybeacat804@gmail.com>
+Date: Sun, 11 May 2025 20:24:51 -0400
+Subject: [PATCH] Make new windows attach to active client
+
+---
+ dwl.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/dwl.c b/dwl.c
+index cf3ef70..1907c5f 100644
+--- a/dwl.c
++++ b/dwl.c
+@@ -1726,7 +1726,11 @@ mapnotify(struct wl_listener *listener, void *data)
+ c->geom.height += 2 * c->bw;
+
+ /* Insert this client into client lists. */
+- wl_list_insert(&clients, &c->link);
++ Client* focused = focustop(selmon);
++ if (focused)
++ wl_list_insert(&focused->link, &c->link);
++ else
++ wl_list_insert(&clients, &c->link);
+ wl_list_insert(&fstack, &c->flink);
+
+ /* Set initial monitor, tags, floating status, and focus:
+--
+2.49.0
+