commit c760dd1aba90c0f83796e4d57eb0be23eceef80d
Author: Laslo Hunhold <[email protected]>
Date:   Sat Jun 6 13:39:52 2020 +0200

    Fix infinite loop in dwm-attachbelow-patch
    
    Thanks to Cadey Alicia Ratio for reporting it and Jakub Leszczak for
    providing a diff.
    
    Signed-off-by: Laslo Hunhold <[email protected]>

diff --git a/dwm.suckless.org/patches/attachbelow/dwm-attachbelow-6.2.diff 
b/dwm.suckless.org/patches/attachbelow/dwm-attachbelow-6.2.diff
index d101a3ec..1562b38e 100644
--- a/dwm.suckless.org/patches/attachbelow/dwm-attachbelow-6.2.diff
+++ b/dwm.suckless.org/patches/attachbelow/dwm-attachbelow-6.2.diff
@@ -44,7 +44,7 @@ index 4465af1..bd715a2 100644
 +attachBelow(Client *c)
 +{
 +      //If there is nothing on the monitor or the selected client is 
floating, attach as normal
-+      if(c->mon->sel == NULL || c->mon->sel->isfloating) {
++      if(c->mon->sel == NULL || c->mon->sel == c || c->mon->sel->isfloating) {
 +              attach(c);
 +              return;
 +      }
diff --git 
a/dwm.suckless.org/patches/attachbelow/dwm-attachbelow-toggleable-6.2.diff 
b/dwm.suckless.org/patches/attachbelow/dwm-attachbelow-toggleable-6.2.diff
index e5ff9fd6..3fe2c0d1 100644
--- a/dwm.suckless.org/patches/attachbelow/dwm-attachbelow-toggleable-6.2.diff
+++ b/dwm.suckless.org/patches/attachbelow/dwm-attachbelow-toggleable-6.2.diff
@@ -40,7 +40,7 @@ index 4465af1..bd715a2 100644
 +attachBelow(Client *c)
 +{
 +      //If there is nothing on the monitor or the selected client is 
floating, attach as normal
-+      if(c->mon->sel == NULL || c->mon->sel->isfloating) {
++      if(c->mon->sel == NULL || c->mon->sel == c || c->mon->sel->isfloating) {
 +              attach(c);
 +              return;
 +      }


Reply via email to