commit 8b9327357b22b14d3ac11025544e78139904653a
Author: MLquest8 <[email protected]>
Date:   Fri Jun 12 17:38:24 2020 +0400

    [dwm][PATCH] added "ruled" version of sizehints

diff --git a/dwm.suckless.org/patches/sizehints/dwm-sizehints-ruled-6.2.diff 
b/dwm.suckless.org/patches/sizehints/dwm-sizehints-ruled-6.2.diff
new file mode 100644
index 00000000..78b04bba
--- /dev/null
+++ b/dwm.suckless.org/patches/sizehints/dwm-sizehints-ruled-6.2.diff
@@ -0,0 +1,47 @@
+From 0ddf28f0fa3285d7c75cb9493ce82075b7819564 Mon Sep 17 00:00:00 2001
+From: MLquest8 <[email protected]>
+Date: Fri, 12 Jun 2020 17:28:03 +0400
+Subject: [PATCH] sizehints version which obeys "isfloating" rule. Version 6.2
+
+---
+ dwm.c | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/dwm.c b/dwm.c
+index 9fd0286..0205e29 100644
+--- a/dwm.c
++++ b/dwm.c
+@@ -1947,12 +1947,14 @@ updatenumlockmask(void)
+ void
+ updatesizehints(Client *c)
+ {
++      int i;
+       long msize;
++      const Rule *r;
+       XSizeHints size;
+ 
+       if (!XGetWMNormalHints(dpy, c->win, &size, &msize))
+               /* size is uninitialized, ensure that size.flags aren't used */
+-              size.flags = PSize;
++              size.flags = 0;
+       if (size.flags & PBaseSize) {
+               c->basew = size.base_width;
+               c->baseh = size.base_height;
+@@ -1984,6 +1986,14 @@ updatesizehints(Client *c)
+               c->maxa = (float)size.max_aspect.x / size.max_aspect.y;
+       } else
+               c->maxa = c->mina = 0.0;
++      for (i = 0; i < LENGTH(rules); i++) {
++              r = &rules[i];
++              if((size.flags & PSize) && (r->isfloating != 0)) {
++                      c->basew = size.base_width;
++                      c->baseh = size.base_height;
++                      c->isfloating = True;
++              }
++      }
+       c->isfixed = (c->maxw && c->maxh && c->maxw == c->minw && c->maxh == 
c->minh);
+ }
+ 
+-- 
+2.26.2
+
diff --git a/dwm.suckless.org/patches/sizehints/index.md 
b/dwm.suckless.org/patches/sizehints/index.md
index de5eddb2..333f3c10 100644
--- a/dwm.suckless.org/patches/sizehints/index.md
+++ b/dwm.suckless.org/patches/sizehints/index.md
@@ -8,17 +8,25 @@ that requests a specific initial size will be floated and set 
to that size.
 Unlike with "fixed size" windows, you are able to resize and/or unfloat these
 windows freely - only the initial state is affected.
 
-This patch is honestly of limited utility since there are many clients that
-will abuse it.
+Ruled
+-----
+Ruled version is essentially the same patch except it obeys `isfloating` rule  
+if it is available in `config.h` for the given client.
 
-There is no configuration for this patch.
+Vanilla
+-------
+This version of the patch is honestly of limited utility since there are many  
+clients that will abuse it.
+
+There is no configuration for this version of the patch.
 
 Download
 --------
+* [dwm-sizehints-ruled-6.2.diff](dwm-sizehints-ruled-6.2.diff) (12/06/2020)
 * [dwm-sizehints-6.2.diff](dwm-sizehints-6.2.diff) (12/06/2020)
 * [dwm-sizehints-5.7.2.diff](dwm-sizehints-5.7.2.diff) (695B) (20091221)
 
 Author
 ------
-* MLquest8 (updated for 6.2) (miskuzius at gmail.com)
+* MLquest8 (update for 6.2 and `Ruled` version) (miskuzius at gmail.com)
 * Ray Kohler - ataraxia937 gmail com


Reply via email to