commit 1a81284fe6bc0fe067b9890bc5336f216e906111
Author: HJ-Zhang <[email protected]>
Date:   Sat Jul 13 23:44:05 2024 +0800

    preview-all-windows:fix focus client error

diff --git 
a/dwm.suckless.org/patches/preview-all-win/dwm-preview-all-windows-6.5.diff 
b/dwm.suckless.org/patches/preview-all-win/dwm-preview-all-windows-6.5.diff
index 8b989201..a3ef0934 100644
--- a/dwm.suckless.org/patches/preview-all-win/dwm-preview-all-windows-6.5.diff
+++ b/dwm.suckless.org/patches/preview-all-win/dwm-preview-all-windows-6.5.diff
@@ -83,7 +83,7 @@ index 67c6b2b..bf30141 100644
 +    return;
 +  }
 +  Monitor *m = selmon;
-+  Client *c;
++  Client *c, *focus_c = NULL;
 +  unsigned int n;
 +  for (n = 0, c = m->clients; c; c = c->next, n++){
 +    /* If you hit actualfullscreen patch Unlock the notes below */
@@ -120,7 +120,8 @@ index 67c6b2b..bf30141 100644
 +              if (event.xbutton.window == c->pre.win){
 +                selmon->seltags ^= 1; /* toggle sel tagset */
 +                m->tagset[selmon->seltags] = c->tags;
-+                focus(c);
++                focus_c = c;
++                focus(NULL);
 +                /* If you hit awesomebar patch Unlock the notes below */
 +                // if (HIDDEN(c)){
 +                //   showwin(c);
@@ -154,6 +155,7 @@ index 67c6b2b..bf30141 100644
 +              }
 +  }
 +  arrange(m);
++  focus(focus_c);
 +}
 +
 +void setpreviewwindowsizepositions(unsigned int n, Monitor *m, unsigned int 
gappo, unsigned int gappi){


Reply via email to