mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 12:05:45 +00:00
dragcfact and dragmfact improvements
This commit is contained in:
parent
a560b9cb53
commit
692affcff7
@ -10,6 +10,8 @@ setcfact(const Arg *arg)
|
|||||||
return;
|
return;
|
||||||
if (!arg->f)
|
if (!arg->f)
|
||||||
f = 1.0;
|
f = 1.0;
|
||||||
|
else if (arg->f > 4.0) // set fact absolutely
|
||||||
|
f = arg->f - 4.0;
|
||||||
else
|
else
|
||||||
f = arg->f + c->cfact;
|
f = arg->f + c->cfact;
|
||||||
if (f < 0.25)
|
if (f < 0.25)
|
||||||
|
@ -57,7 +57,8 @@ dragcfact(const Arg *arg)
|
|||||||
fact = (float) -4.0 * dist_y / c->mon->wh;
|
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_x = ev.xmotion.x;
|
||||||
prev_y = ev.xmotion.y;
|
prev_y = ev.xmotion.y;
|
||||||
|
@ -28,28 +28,28 @@ dragmfact(const Arg *arg)
|
|||||||
if (!m->lt[m->sellt]->arrange // floating
|
if (!m->lt[m->sellt]->arrange // floating
|
||||||
|| (m->nmaster && n <= m->nmaster) // no master
|
|| (m->nmaster && n <= m->nmaster) // no master
|
||||||
#if MONOCLE_LAYOUT
|
#if MONOCLE_LAYOUT
|
||||||
|| m->lt[m->sellt]->arrange == monocle
|
|| m->lt[m->sellt]->arrange == &monocle
|
||||||
#endif // MONOCLE_LAYOUT
|
#endif // MONOCLE_LAYOUT
|
||||||
#if GRIDMODE_LAYOUT
|
#if GRIDMODE_LAYOUT
|
||||||
|| m->lt[m->sellt]->arrange == grid
|
|| m->lt[m->sellt]->arrange == &grid
|
||||||
#endif // GRIDMODE_LAYOUT
|
#endif // GRIDMODE_LAYOUT
|
||||||
#if HORIZGRID_LAYOUT
|
#if HORIZGRID_LAYOUT
|
||||||
|| m->lt[m->sellt]->arrange == horizgrid
|
|| m->lt[m->sellt]->arrange == &horizgrid
|
||||||
#endif // HORIZGRID_LAYOUT
|
#endif // HORIZGRID_LAYOUT
|
||||||
#if GAPPLESSGRID_LAYOUT
|
#if GAPPLESSGRID_LAYOUT
|
||||||
|| m->lt[m->sellt]->arrange == gaplessgrid
|
|| m->lt[m->sellt]->arrange == &gaplessgrid
|
||||||
#endif // GAPPLESSGRID_LAYOUT
|
#endif // GAPPLESSGRID_LAYOUT
|
||||||
#if NROWGRID_LAYOUT
|
#if NROWGRID_LAYOUT
|
||||||
|| m->lt[m->sellt]->arrange == nrowgrid
|
|| m->lt[m->sellt]->arrange == &nrowgrid
|
||||||
#endif // NROWGRID_LAYOUT
|
#endif // NROWGRID_LAYOUT
|
||||||
#if FLEXTILE_DELUXE_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
|
#endif // FLEXTILE_DELUXE_LAYOUT
|
||||||
)
|
)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#if FLEXTILE_DELUXE_LAYOUT
|
#if FLEXTILE_DELUXE_LAYOUT
|
||||||
if (m->lt[m->sellt]->arrange == flextile) {
|
if (m->lt[m->sellt]->arrange == &flextile) {
|
||||||
int layout = m->ltaxis[LAYOUT];
|
int layout = m->ltaxis[LAYOUT];
|
||||||
if (layout < 0) {
|
if (layout < 0) {
|
||||||
mirror = 1;
|
mirror = 1;
|
||||||
@ -74,19 +74,19 @@ dragmfact(const Arg *arg)
|
|||||||
}
|
}
|
||||||
#endif // FLEXTILE_DELUXE_LAYOUT
|
#endif // FLEXTILE_DELUXE_LAYOUT
|
||||||
#if CENTEREDMASTER_LAYOUT
|
#if CENTEREDMASTER_LAYOUT
|
||||||
else if (m->lt[m->sellt]->arrange == centeredmaster)
|
else if (m->lt[m->sellt]->arrange == ¢eredmaster)
|
||||||
center = 1;
|
center = 1;
|
||||||
#endif // CENTEREDMASTER_LAYOUT
|
#endif // CENTEREDMASTER_LAYOUT
|
||||||
#if CENTEREDFLOATINGMASTER_LAYOUT
|
#if CENTEREDFLOATINGMASTER_LAYOUT
|
||||||
else if (m->lt[m->sellt]->arrange == centeredfloatingmaster)
|
else if (m->lt[m->sellt]->arrange == ¢eredfloatingmaster)
|
||||||
center = 1;
|
center = 1;
|
||||||
#endif // CENTEREDFLOATINGMASTER_LAYOUT
|
#endif // CENTEREDFLOATINGMASTER_LAYOUT
|
||||||
#if BSTACK_LAYOUT
|
#if BSTACK_LAYOUT
|
||||||
else if (m->lt[m->sellt]->arrange == bstack)
|
else if (m->lt[m->sellt]->arrange == &bstack)
|
||||||
horizontal = 1;
|
horizontal = 1;
|
||||||
#endif // BSTACK_LAYOUT
|
#endif // BSTACK_LAYOUT
|
||||||
#if BSTACKHORIZ_LAYOUT
|
#if BSTACKHORIZ_LAYOUT
|
||||||
else if (m->lt[m->sellt]->arrange == bstackhoriz)
|
else if (m->lt[m->sellt]->arrange == &bstackhoriz)
|
||||||
horizontal = 1;
|
horizontal = 1;
|
||||||
#endif // BSTACKHORIZ_LAYOUT
|
#endif // BSTACKHORIZ_LAYOUT
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user