diff --git a/dwm.c b/dwm.c index 575e3a5..7667e40 100644 --- a/dwm.c +++ b/dwm.c @@ -3812,47 +3812,47 @@ zoom(const Arg *arg) return; #if ZOOMSWAP_PATCH - if (c == nexttiled(selmon->clients)) { + if (c == nexttiled(selmon->clients)) { + #if PERTAG_PATCH + p = selmon->pertag->prevzooms[selmon->pertag->curtag]; + #else + p = prevzoom; + #endif // PERTAG_PATCH + at = prevtiled(p); + if (at) + cprevious = nexttiled(at->next); + if (!cprevious || cprevious != p) { #if PERTAG_PATCH - p = selmon->pertag->prevzooms[selmon->pertag->curtag]; + selmon->pertag->prevzooms[selmon->pertag->curtag] = NULL; #else - p = prevzoom; + prevzoom = NULL; #endif // PERTAG_PATCH - at = prevtiled(p); - if (at) - cprevious = nexttiled(at->next); - if (!cprevious || cprevious != p) { - #if PERTAG_PATCH - selmon->pertag->prevzooms[selmon->pertag->curtag] = NULL; - #else - prevzoom = NULL; - #endif // PERTAG_PATCH - if (!c || !(c = nexttiled(c->next))) - return; - } else - c = cprevious; - } + if (!c || !(c = nexttiled(c->next))) + return; + } else + c = cprevious; + } - cold = nexttiled(selmon->clients); - if (c != cold && !at) - at = prevtiled(c); - detach(c); - attach(c); - /* swap windows instead of pushing the previous one down */ - if (c != cold && at) { - #if PERTAG_PATCH - selmon->pertag->prevzooms[selmon->pertag->curtag] = cold; - #else - prevzoom = cold; - #endif // PERTAG_PATCH - if (cold && at != cold) { - detach(cold); - cold->next = at->next; - at->next = cold; - } + cold = nexttiled(selmon->clients); + if (c != cold && !at) + at = prevtiled(c); + detach(c); + attach(c); + /* swap windows instead of pushing the previous one down */ + if (c != cold && at) { + #if PERTAG_PATCH + selmon->pertag->prevzooms[selmon->pertag->curtag] = cold; + #else + prevzoom = cold; + #endif // PERTAG_PATCH + if (cold && at != cold) { + detach(cold); + cold->next = at->next; + at->next = cold; } - focus(c); - arrange(c->mon); + } + focus(c); + arrange(c->mon); #else if (c == nexttiled(selmon->clients)) if (!c || !(c = nexttiled(c->next))) diff --git a/patch/cfacts.c b/patch/cfacts.c index 591bb5f..872c8e8 100644 --- a/patch/cfacts.c +++ b/patch/cfacts.c @@ -17,7 +17,7 @@ setcfact(const Arg *arg) arrange(selmon); } -#if BSTACK_LAYOUT || BSTACKHORIZ_LAYOUT || CENTEREDMASTER_LAYOUT || CENTEREDFLOATINGMASTER_LAYOUT || COLUMNS_LAYOUT || DECK_LAYOUT || TILE_LAYOUT || MONOCLE_LAYOUT +#if BSTACK_LAYOUT || BSTACKHORIZ_LAYOUT || CENTEREDMASTER_LAYOUT || CENTEREDFLOATINGMASTER_LAYOUT || COLUMNS_LAYOUT || DECK_LAYOUT || TILE_LAYOUT void getfacts(Monitor *m, float *mf, float *sf) { diff --git a/patch/cfacts.h b/patch/cfacts.h index 2df3b04..9b135df 100644 --- a/patch/cfacts.h +++ b/patch/cfacts.h @@ -1,4 +1,4 @@ -#if BSTACK_LAYOUT || BSTACKHORIZ_LAYOUT || CENTEREDMASTER_LAYOUT || CENTEREDFLOATINGMASTER_LAYOUT || COLUMNS_LAYOUT || DECK_LAYOUT || TILE_LAYOUT || MONOCLE_LAYOUT +#if BSTACK_LAYOUT || BSTACKHORIZ_LAYOUT || CENTEREDMASTER_LAYOUT || CENTEREDFLOATINGMASTER_LAYOUT || COLUMNS_LAYOUT || DECK_LAYOUT || TILE_LAYOUT static void getfacts(Monitor *m, float *mf, float *sf); #endif static void setcfact(const Arg *arg); diff --git a/patch/vanitygaps.c b/patch/vanitygaps.c index 460f4a7..e39a3f2 100644 --- a/patch/vanitygaps.c +++ b/patch/vanitygaps.c @@ -106,7 +106,7 @@ incrivgaps(const Arg *arg) ); } -#if CENTEREDFLOATINGMASTER_LAYOUT || COLUMNS_LAYOUT || DECK_LAYOUT || FIBONACCI_DWINDLE_LAYOUT || FIBONACCI_SPIRAL_LAYOUT || GAPPLESSGRID_LAYOUT || HORIZGRID_LAYOUT || BSTACK_LAYOUT || BSTACKHORIZ_LAYOUT || GRIDMODE_LAYOUT || FLEXTILE_DELUXE_LAYOUT +#if CENTEREDFLOATINGMASTER_LAYOUT || COLUMNS_LAYOUT || DECK_LAYOUT || FIBONACCI_DWINDLE_LAYOUT || FIBONACCI_SPIRAL_LAYOUT || GAPPLESSGRID_LAYOUT || HORIZGRID_LAYOUT || BSTACK_LAYOUT || BSTACKHORIZ_LAYOUT || GRIDMODE_LAYOUT || FLEXTILE_DELUXE_LAYOUT || TILE_LAYOUT static void getgaps(Monitor *m, int *oh, int *ov, int *ih, int *iv, unsigned int *nc) { @@ -124,4 +124,4 @@ getgaps(Monitor *m, int *oh, int *ov, int *ih, int *iv, unsigned int *nc) *iv = m->gappiv*ie; // inner vertical gap *nc = n; // number of clients } -#endif // CENTEREDFLOATINGMASTER_LAYOUT || DECK_LAYOUT || FIBONACCI_DWINDLE_LAYOUT || FIBONACCI_SPIRAL_LAYOUT || GAPPLESSGRID_LAYOUT || HORIZGRID_LAYOUT || BSTACK_LAYOUT || BSTACKHORIZ_LAYOUT || GRIDMODE_LAYOUT || FLEXTILE_DELUXE_LAYOUT \ No newline at end of file +#endif // CENTEREDFLOATINGMASTER_LAYOUT || DECK_LAYOUT || FIBONACCI_DWINDLE_LAYOUT || FIBONACCI_SPIRAL_LAYOUT || GAPPLESSGRID_LAYOUT || HORIZGRID_LAYOUT || BSTACK_LAYOUT || BSTACKHORIZ_LAYOUT || GRIDMODE_LAYOUT || FLEXTILE_DELUXE_LAYOUT || TILE_LAYOUT \ No newline at end of file diff --git a/patch/vanitygaps.h b/patch/vanitygaps.h index f86fa75..b9de15a 100644 --- a/patch/vanitygaps.h +++ b/patch/vanitygaps.h @@ -10,7 +10,7 @@ static void incrivgaps(const Arg *arg); static void togglegaps(const Arg *arg); /* Internals */ -#if CENTEREDFLOATINGMASTER_LAYOUT || COLUMNS_LAYOUT || DECK_LAYOUT || FIBONACCI_DWINDLE_LAYOUT || FIBONACCI_SPIRAL_LAYOUT || GAPPLESSGRID_LAYOUT || HORIZGRID_LAYOUT || BSTACK_LAYOUT || BSTACKHORIZ_LAYOUT || GRIDMODE_LAYOUT || FLEXTILE_DELUXE_LAYOUT +#if CENTEREDFLOATINGMASTER_LAYOUT || COLUMNS_LAYOUT || DECK_LAYOUT || FIBONACCI_DWINDLE_LAYOUT || FIBONACCI_SPIRAL_LAYOUT || GAPPLESSGRID_LAYOUT || HORIZGRID_LAYOUT || BSTACK_LAYOUT || BSTACKHORIZ_LAYOUT || GRIDMODE_LAYOUT || FLEXTILE_DELUXE_LAYOUT || TILE_LAYOUT static void getgaps(Monitor *m, int *oh, int *ov, int *ih, int *iv, unsigned int *nc); -#endif // CENTEREDFLOATINGMASTER_LAYOUT || DECK_LAYOUT || FIBONACCI_DWINDLE_LAYOUT || FIBONACCI_SPIRAL_LAYOUT || GAPPLESSGRID_LAYOUT || HORIZGRID_LAYOUT || BSTACK_LAYOUT || BSTACKHORIZ_LAYOUT || GRIDMODE_LAYOUT || FLEXTILE_DELUXE_LAYOUT +#endif // CENTEREDFLOATINGMASTER_LAYOUT || DECK_LAYOUT || FIBONACCI_DWINDLE_LAYOUT || FIBONACCI_SPIRAL_LAYOUT || GAPPLESSGRID_LAYOUT || HORIZGRID_LAYOUT || BSTACK_LAYOUT || BSTACKHORIZ_LAYOUT || GRIDMODE_LAYOUT || FLEXTILE_DELUXE_LAYOUT || TILE_LAYOUT static void setgaps(int oh, int ov, int ih, int iv); \ No newline at end of file