mirror of
https://codeberg.org/dwl/dwl-patches.git
synced 2026-11-03 11:52:25 +00:00
[gaplessgrid] bring in kanas updates to latest patch
This commit is contained in:
@@ -19,7 +19,7 @@ index a4019d3..d596f0c 100644
|
||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_space, togglefloating, {0} },
|
||||
{ MODKEY, XKB_KEY_e, togglefullscreen, {0} },
|
||||
diff --git a/dwl.c b/dwl.c
|
||||
index cca1ea4..9c0ed3c 100644
|
||||
index cca1ea4..43ab340 100644
|
||||
--- a/dwl.c
|
||||
+++ b/dwl.c
|
||||
@@ -311,6 +311,7 @@ static void focusstack(const Arg *arg);
|
||||
@@ -37,7 +37,7 @@ index cca1ea4..9c0ed3c 100644
|
||||
+void
|
||||
+gaplessgrid(Monitor *m)
|
||||
+{
|
||||
+ unsigned int n = 0, i = 0, ch, cw, cn, rn, rows, cols;
|
||||
+ int n = 0, i = 0, ch, cw, cn, rn, rows, cols;
|
||||
+ Client *c;
|
||||
+
|
||||
+ wl_list_for_each(c, &clients, link)
|
||||
@@ -54,12 +54,12 @@ index cca1ea4..9c0ed3c 100644
|
||||
+ if (n == 5) /* set layout against the general calculation: not 1:2:2, but 2:3 */
|
||||
+ cols = 2;
|
||||
+
|
||||
+ /* widescreen is better if 3 columns */
|
||||
+ if (n >= 3 && n <= 6 && (m->w.width / m->w.height) > 1)
|
||||
+ cols = 3;
|
||||
+ /* widescreen is better if 3 columns */
|
||||
+ if (n >= 3 && n <= 6 && (m->w.width / m->w.height) > 1)
|
||||
+ cols = 3;
|
||||
+
|
||||
+ rows = n / cols;
|
||||
+
|
||||
+
|
||||
+ /* window geometries */
|
||||
+ cw = cols ? m->w.width / cols : m->w.width;
|
||||
+ cn = 0; /* current column number */
|
||||
|
||||
Reference in New Issue
Block a user