attachtop: fix floating window edge case

Issue: #533
This commit is contained in:
Santiago Lo Coco 2025-06-16 23:37:45 +02:00 committed by Nikita Ivanov
parent 1d16e63d46
commit 7dd8eef128
No known key found for this signature in database
GPG Key ID: 6E656AC5B97B5133
2 changed files with 5 additions and 5 deletions

View File

@ -7,7 +7,7 @@ Behavior feels very intuitive as it doesn't disrupt existing masters no matter t
### Download
- [git branch](https://codeberg.org/nikitaivanov/dwl/src/branch/attachtop)
- [2024-04-23](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/attachtop/attachtop.patch)
- [2025-06-16](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/attachtop/attachtop.patch)
### Authors
- [Nikita Ivanov](https://codeberg.org/nikitaivanov)

View File

@ -1,4 +1,4 @@
From 42a66d6e06c38e913766ce625f049fdbc3dd0d12 Mon Sep 17 00:00:00 2001
From 29e6a4bef02c473cc5bd04804fe508bda265077d Mon Sep 17 00:00:00 2001
From: Nikita Ivanov <nikita.vyach.ivanov@gmail.com>
Date: Sun, 7 Apr 2024 21:10:17 +0200
Subject: [PATCH] New client are attached on top of the stack
@ -8,7 +8,7 @@ Subject: [PATCH] New client are attached on top of the stack
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/dwl.c b/dwl.c
index bf763df..c0a3d74 100644
index bf763df..02e3d07 100644
--- a/dwl.c
+++ b/dwl.c
@@ -1605,7 +1605,18 @@ mapnotify(struct wl_listener *listener, void *data)
@ -18,7 +18,7 @@ index bf763df..c0a3d74 100644
- wl_list_insert(&clients, &c->link);
+ i = 0;
+ wl_list_for_each(w, &clients, link) {
+ if (!VISIBLEON(w, selmon) || c->isfloating)
+ if (!VISIBLEON(w, selmon) || w->isfloating)
+ continue;
+ p = w;
+ if (++i >= selmon->nmaster)
@ -32,5 +32,5 @@ index bf763df..c0a3d74 100644
/* Set initial monitor, tags, floating status, and focus:
--
2.44.0
2.49.0