commit 78378799708f3623784051b3190bc4842d05327f
Author: opseter <[email protected]>
Date:   Sun Apr 10 10:03:35 2022 +0800

    [dwm][patch][viewonrulestag]update this patch to fix bugs

diff --git 
a/dwm.suckless.org/patches/viewonrulestag/dwm-viewonrulestag-20220407-bece862.diff
 
b/dwm.suckless.org/patches/viewonrulestag/dwm-viewonrulestag-20220410-bece862.diff
similarity index 51%
rename from 
dwm.suckless.org/patches/viewonrulestag/dwm-viewonrulestag-20220407-bece862.diff
rename to 
dwm.suckless.org/patches/viewonrulestag/dwm-viewonrulestag-20220410-bece862.diff
index 9b4ad013..b3d84677 100644
--- 
a/dwm.suckless.org/patches/viewonrulestag/dwm-viewonrulestag-20220407-bece862.diff
+++ 
b/dwm.suckless.org/patches/viewonrulestag/dwm-viewonrulestag-20220410-bece862.diff
@@ -1,42 +1,41 @@
-From 635ae9efbff2ce9d6749e17908320d44582084cd Mon Sep 17 00:00:00 2001
+From 749e118a78fa884af5bd766c714f91cac995f257 Mon Sep 17 00:00:00 2001
 From: opseter <[email protected]>
-Date: Thu, 7 Apr 2022 17:45:58 +0800
-Subject: [PATCH] view on rules defined tag
+Date: Sat, 9 Apr 2022 11:28:56 +0800
+Subject: [PATCH] v2
 
 ---
  config.def.h | 1 +
- dwm.c        | 6 ++++++
- 2 files changed, 7 insertions(+)
+ dwm.c        | 5 +++++
+ 2 files changed, 6 insertions(+)
 
 diff --git a/config.def.h b/config.def.h
-index a2ac963..d077654 100644
+index a2ac963..a2fc692 100644
 --- a/config.def.h
 +++ b/config.def.h
 @@ -5,6 +5,7 @@ static const unsigned int borderpx  = 1;        /* border 
pixel of windows */
  static const unsigned int snap      = 32;       /* snap pixel */
  static const int showbar            = 1;        /* 0 means no bar */
  static const int topbar             = 1;        /* 0 means bottom bar */
-+static const int viewonrulestag        = 1;            /* 1 means when open 
applications view will move to tags defined in rules*/
++static const int viewonrulestag       = 1;             /* 1 means when open 
applications view will move to tags defined in rules*/
  static const char *fonts[]          = { "monospace:size=10" };
  static const char dmenufont[]       = "monospace:size=10";
  static const char col_gray1[]       = "#222222";
 diff --git a/dwm.c b/dwm.c
-index 5f16260..2392d2f 100644
+index 5f16260..afab263 100644
 --- a/dwm.c
 +++ b/dwm.c
-@@ -300,6 +300,12 @@ applyrules(Client *c)
-               {
-                       c->isfloating = r->isfloating;
-                       c->tags |= r->tags;
-+                      if(viewonrulestag)
-+                      {
-+                              Arg a = {.ui = r->tags};
-+                              view(&a);
-+                      }
-+                      
-                       for (m = mons; m && m->num != r->monitor; m = m->next);
-                       if (m)
-                               c->mon = m;
+@@ -310,6 +310,11 @@ applyrules(Client *c)
+       if (ch.res_name)
+               XFree(ch.res_name);
+       c->tags = c->tags & TAGMASK ? c->tags & TAGMASK : 
c->mon->tagset[c->mon->seltags];
++      if(viewonrulestag)
++      {
++              Arg a = {.ui = c->tags};
++              view(&a);
++      }
+ }
+ 
+ int
 -- 
 2.35.1
 
diff --git a/dwm.suckless.org/patches/viewonrulestag/index.md 
b/dwm.suckless.org/patches/viewonrulestag/index.md
index 6eef09c2..81235df7 100644
--- a/dwm.suckless.org/patches/viewonrulestag/index.md
+++ b/dwm.suckless.org/patches/viewonrulestag/index.md
@@ -7,7 +7,7 @@ In the origin version of dwm, even you defined window opens in 
which tag in rule
 
 Download
 --------
-* 
[dwm-viewonrulesdefinedtag-20220407-bece862a.diff](dwm-viewonrulesdefinedtag-20220407-bece862a.diff)
+* 
[dwm-viewonrulestag-20220410-bece862.diff](dwm-viewonrulestag-20220410-bece862.diff)
 
 Author
 ------


Reply via email to