summaryrefslogtreecommitdiffhomepage
path: root/patch
diff options
context:
space:
mode:
authorbakkeby <[email protected]>2020-03-31 09:07:00 +0200
committerbakkeby <[email protected]>2020-03-31 11:07:24 +0200
commit692affcff7593f718db827edf70a2b130725a1f3 (patch)
tree698c03f1e3f496c4110dc156168e1b7d22b89add /patch
parenta560b9cb53f3efc031e8d944231f53f4a9720203 (diff)
downloaddwm-flexipatch-692affcff7593f718db827edf70a2b130725a1f3.tar.gz
dwm-flexipatch-692affcff7593f718db827edf70a2b130725a1f3.zip
dragcfact and dragmfact improvements
Diffstat (limited to 'patch')
-rw-r--r--patch/cfacts.c2
-rw-r--r--patch/dragcfact.c3
-rw-r--r--patch/dragmfact.c22
3 files changed, 15 insertions, 12 deletions
diff --git a/patch/cfacts.c b/patch/cfacts.c
index 223436f..ece210f 100644
--- a/patch/cfacts.c
+++ b/patch/cfacts.c
@@ -10,6 +10,8 @@ setcfact(const Arg *arg)
return;
if (!arg->f)
f = 1.0;
+ else if (arg->f > 4.0) // set fact absolutely
+ f = arg->f - 4.0;
else
f = arg->f + c->cfact;
if (f < 0.25)
diff --git a/patch/dragcfact.c b/patch/dragcfact.c
index 98e2e31..9d20a2b 100644
--- a/patch/dragcfact.c
+++ b/patch/dragcfact.c
@@ -57,7 +57,8 @@ dragcfact(const Arg *arg)
fact = (float) -4.0 * dist_y / c->mon->wh;
}
- setcfact(&((Arg) { .f = fact }));
+ if (fact)
+ setcfact(&((Arg) { .f = fact }));
prev_x = ev.xmotion.x;
prev_y = ev.xmotion.y;
diff --git a/patch/dragmfact.c b/patch/dragmfact.c
index ee76647..444557c 100644
--- a/patch/dragmfact.c
+++ b/patch/dragmfact.c
@@ -28,28 +28,28 @@ dragmfact(const Arg *arg)
if (!m->lt[m->sellt]->arrange // floating
|| (m->nmaster && n <= m->nmaster) // no master
#if MONOCLE_LAYOUT
- || m->lt[m->sellt]->arrange == monocle
+ || m->lt[m->sellt]->arrange == &monocle
#endif // MONOCLE_LAYOUT
#if GRIDMODE_LAYOUT
- || m->lt[m->sellt]->arrange == grid
+ || m->lt[m->sellt]->arrange == &grid
#endif // GRIDMODE_LAYOUT
#if HORIZGRID_LAYOUT
- || m->lt[m->sellt]->arrange == horizgrid
+ || m->lt[m->sellt]->arrange == &horizgrid
#endif // HORIZGRID_LAYOUT
#if GAPPLESSGRID_LAYOUT
- || m->lt[m->sellt]->arrange == gaplessgrid
+ || m->lt[m->sellt]->arrange == &gaplessgrid
#endif // GAPPLESSGRID_LAYOUT
#if NROWGRID_LAYOUT
- || m->lt[m->sellt]->arrange == nrowgrid
+ || m->lt[m->sellt]->arrange == &nrowgrid
#endif // NROWGRID_LAYOUT
#if FLEXTILE_DELUXE_LAYOUT
- || (m->lt[m->sellt]->arrange == flextile && m->ltaxis[LAYOUT] == NO_SPLIT)
+ || (m->lt[m->sellt]->arrange == &flextile && m->ltaxis[LAYOUT] == NO_SPLIT)
#endif // FLEXTILE_DELUXE_LAYOUT
)
return;
#if FLEXTILE_DELUXE_LAYOUT
- if (m->lt[m->sellt]->arrange == flextile) {
+ if (m->lt[m->sellt]->arrange == &flextile) {
int layout = m->ltaxis[LAYOUT];
if (layout < 0) {
mirror = 1;
@@ -74,19 +74,19 @@ dragmfact(const Arg *arg)
}
#endif // FLEXTILE_DELUXE_LAYOUT
#if CENTEREDMASTER_LAYOUT
- else if (m->lt[m->sellt]->arrange == centeredmaster)
+ else if (m->lt[m->sellt]->arrange == &centeredmaster)
center = 1;
#endif // CENTEREDMASTER_LAYOUT
#if CENTEREDFLOATINGMASTER_LAYOUT
- else if (m->lt[m->sellt]->arrange == centeredfloatingmaster)
+ else if (m->lt[m->sellt]->arrange == &centeredfloatingmaster)
center = 1;
#endif // CENTEREDFLOATINGMASTER_LAYOUT
#if BSTACK_LAYOUT
- else if (m->lt[m->sellt]->arrange == bstack)
+ else if (m->lt[m->sellt]->arrange == &bstack)
horizontal = 1;
#endif // BSTACK_LAYOUT
#if BSTACKHORIZ_LAYOUT
- else if (m->lt[m->sellt]->arrange == bstackhoriz)
+ else if (m->lt[m->sellt]->arrange == &bstackhoriz)
horizontal = 1;
#endif // BSTACKHORIZ_LAYOUT