mirror of
https://codeberg.org/dwl/dwl-patches.git
synced 2025-09-06 19:24:51 +00:00
Add attachfocused patch.
This patch changes dwl to make new clients attach below the currently focused one, like you can do on hyprland. Finish readme Add known issue to README
This commit is contained in:
parent
3b4043eb14
commit
285921afe4
11
patches/attachfocused/README.md
Normal file
11
patches/attachfocused/README.md
Normal file
@ -0,0 +1,11 @@
|
||||
### Description
|
||||
Makes windows attach below the currently active window.
|
||||
|
||||
KNOWN ISSUES: Upon closing the last client when using multiple monitors, the last client will briefly flash on all
|
||||
monitors before closing.
|
||||
|
||||
### Download
|
||||
- [0.7](/dwl/dwl-patches/raw/branch/main/patches/attachfocused/attachfocused.patch)
|
||||
|
||||
### Authors
|
||||
- [MayOrMayNotBeACat](https://codeberg.org/MayOrMayNotBeACat)
|
29
patches/attachfocused/attachfocused.patch
Normal file
29
patches/attachfocused/attachfocused.patch
Normal file
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user