mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 14:05:45 +02:00
Fixes for missleading variable? #2
This commit is contained in:
parent
462445a378
commit
bf4fdc6484
72
dwm.c
72
dwm.c
@ -3812,47 +3812,47 @@ zoom(const Arg *arg)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
#if ZOOMSWAP_PATCH
|
#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
|
#if PERTAG_PATCH
|
||||||
p = selmon->pertag->prevzooms[selmon->pertag->curtag];
|
selmon->pertag->prevzooms[selmon->pertag->curtag] = NULL;
|
||||||
#else
|
#else
|
||||||
p = prevzoom;
|
prevzoom = NULL;
|
||||||
#endif // PERTAG_PATCH
|
#endif // PERTAG_PATCH
|
||||||
at = prevtiled(p);
|
if (!c || !(c = nexttiled(c->next)))
|
||||||
if (at)
|
return;
|
||||||
cprevious = nexttiled(at->next);
|
} else
|
||||||
if (!cprevious || cprevious != p) {
|
c = cprevious;
|
||||||
#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;
|
|
||||||
}
|
|
||||||
|
|
||||||
cold = nexttiled(selmon->clients);
|
cold = nexttiled(selmon->clients);
|
||||||
if (c != cold && !at)
|
if (c != cold && !at)
|
||||||
at = prevtiled(c);
|
at = prevtiled(c);
|
||||||
detach(c);
|
detach(c);
|
||||||
attach(c);
|
attach(c);
|
||||||
/* swap windows instead of pushing the previous one down */
|
/* swap windows instead of pushing the previous one down */
|
||||||
if (c != cold && at) {
|
if (c != cold && at) {
|
||||||
#if PERTAG_PATCH
|
#if PERTAG_PATCH
|
||||||
selmon->pertag->prevzooms[selmon->pertag->curtag] = cold;
|
selmon->pertag->prevzooms[selmon->pertag->curtag] = cold;
|
||||||
#else
|
#else
|
||||||
prevzoom = cold;
|
prevzoom = cold;
|
||||||
#endif // PERTAG_PATCH
|
#endif // PERTAG_PATCH
|
||||||
if (cold && at != cold) {
|
if (cold && at != cold) {
|
||||||
detach(cold);
|
detach(cold);
|
||||||
cold->next = at->next;
|
cold->next = at->next;
|
||||||
at->next = cold;
|
at->next = cold;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
focus(c);
|
}
|
||||||
arrange(c->mon);
|
focus(c);
|
||||||
|
arrange(c->mon);
|
||||||
#else
|
#else
|
||||||
if (c == nexttiled(selmon->clients))
|
if (c == nexttiled(selmon->clients))
|
||||||
if (!c || !(c = nexttiled(c->next)))
|
if (!c || !(c = nexttiled(c->next)))
|
||||||
|
@ -17,7 +17,7 @@ setcfact(const Arg *arg)
|
|||||||
arrange(selmon);
|
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
|
void
|
||||||
getfacts(Monitor *m, float *mf, float *sf)
|
getfacts(Monitor *m, float *mf, float *sf)
|
||||||
{
|
{
|
||||||
|
@ -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);
|
static void getfacts(Monitor *m, float *mf, float *sf);
|
||||||
#endif
|
#endif
|
||||||
static void setcfact(const Arg *arg);
|
static void setcfact(const Arg *arg);
|
||||||
|
@ -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
|
static void
|
||||||
getgaps(Monitor *m, int *oh, int *ov, int *ih, int *iv, unsigned int *nc)
|
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
|
*iv = m->gappiv*ie; // inner vertical gap
|
||||||
*nc = n; // number of clients
|
*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
|
#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
|
@ -10,7 +10,7 @@ static void incrivgaps(const Arg *arg);
|
|||||||
static void togglegaps(const Arg *arg);
|
static void togglegaps(const Arg *arg);
|
||||||
|
|
||||||
/* Internals */
|
/* 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);
|
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);
|
static void setgaps(int oh, int ov, int ih, int iv);
|
Loading…
Reference in New Issue
Block a user