From 20de07dc8759200c8a4c9651475acb331d245890 Mon Sep 17 00:00:00 2001 From: wochap Date: Tue, 9 Jul 2024 15:14:11 +0000 Subject: [PATCH] sync with latest dwl --- patches/bottomstack/bottomstack.patch | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/patches/bottomstack/bottomstack.patch b/patches/bottomstack/bottomstack.patch index 76456d2..c2b9331 100644 --- a/patches/bottomstack/bottomstack.patch +++ b/patches/bottomstack/bottomstack.patch @@ -1,7 +1,7 @@ -From 589c964e47965d84ffd3a2b036e75feddd619eed Mon Sep 17 00:00:00 2001 +From b352fb08f40b1ee2d8c4748be4922df711e3aaa9 Mon Sep 17 00:00:00 2001 From: wochap -Date: Thu, 11 Apr 2024 16:50:20 -0500 -Subject: [PATCH] add bstack and bstackhoriz layouts +Date: Fri, 5 Jul 2024 10:44:29 -0500 +Subject: [PATCH] implement bottomstack --- config.def.h | 4 +++ @@ -9,10 +9,10 @@ Subject: [PATCH] add bstack and bstackhoriz layouts 2 files changed, 88 insertions(+) diff --git a/config.def.h b/config.def.h -index 8847e58..68b62db 100644 +index 22d2171..5aac3e9 100644 --- a/config.def.h +++ b/config.def.h -@@ -33,6 +33,8 @@ static const Layout layouts[] = { +@@ -34,6 +34,8 @@ static const Layout layouts[] = { { "[]=", tile }, { "><>", NULL }, /* no layout function means floating behavior */ { "[M]", monocle }, @@ -21,7 +21,7 @@ index 8847e58..68b62db 100644 }; /* monitors */ -@@ -134,6 +136,8 @@ static const Key keys[] = { +@@ -139,6 +141,8 @@ static const Key keys[] = { { MODKEY, XKB_KEY_t, setlayout, {.v = &layouts[0]} }, { MODKEY, XKB_KEY_f, setlayout, {.v = &layouts[1]} }, { MODKEY, XKB_KEY_m, setlayout, {.v = &layouts[2]} }, @@ -31,10 +31,10 @@ index 8847e58..68b62db 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 bf763df..dc3d000 100644 +index dc0437e..5648d5f 100644 --- a/dwl.c +++ b/dwl.c -@@ -55,6 +55,7 @@ +@@ -57,6 +57,7 @@ #include #include #include @@ -42,7 +42,7 @@ index bf763df..dc3d000 100644 #include #include #include -@@ -347,6 +348,8 @@ static Monitor *xytomon(double x, double y); +@@ -351,6 +352,8 @@ static Monitor *xytomon(double x, double y); static void xytonode(double x, double y, struct wlr_surface **psurface, Client **pc, LayerSurface **pl, double *nx, double *ny); static void zoom(const Arg *arg); @@ -51,7 +51,7 @@ index bf763df..dc3d000 100644 /* variables */ static const char broken[] = "broken"; -@@ -3088,3 +3091,84 @@ main(int argc, char *argv[]) +@@ -3160,3 +3163,84 @@ main(int argc, char *argv[]) usage: die("Usage: %s [-v] [-d] [-s startup command]", argv[0]); } @@ -70,7 +70,7 @@ index bf763df..dc3d000 100644 + return; + + if (n > m->nmaster) { -+ mh = ROUND(m->nmaster ? m->mfact * m->w.height : 0); ++ mh = (int)round(m->nmaster ? m->mfact * m->w.height : 0); + tw = m->w.width / (n - m->nmaster); + ty = m->w.y + mh; + } else { @@ -111,7 +111,7 @@ index bf763df..dc3d000 100644 + return; + + if (n > m->nmaster) { -+ mh = ROUND(m->nmaster ? m->mfact * m->w.height : 0); ++ mh = (int)round(m->nmaster ? m->mfact * m->w.height : 0); + th = (m->w.height - mh) / (n - m->nmaster); + ty = m->w.y + mh; + } else { @@ -137,5 +137,4 @@ index bf763df..dc3d000 100644 + } +} -- -2.43.2 - +2.45.1