|
|
@ -1,7 +1,7 @@
|
|
|
|
/* Settings */
|
|
|
|
/* Settings */
|
|
|
|
#if !PERTAG_PATCH
|
|
|
|
#if !PERTAG_VANITYGAPS_PATCH || !PERTAG_PATCH
|
|
|
|
static int enablegaps = 1;
|
|
|
|
static int enablegaps = 1;
|
|
|
|
#endif // PERTAG_PATCH
|
|
|
|
#endif // PERTAG_VANITYGAPS_PATCH | PERTAG_PATCH
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
static void
|
|
|
|
setgaps(int oh, int ov, int ih, int iv)
|
|
|
|
setgaps(int oh, int ov, int ih, int iv)
|
|
|
@ -15,6 +15,12 @@ setgaps(int oh, int ov, int ih, int iv)
|
|
|
|
selmon->gappov = ov;
|
|
|
|
selmon->gappov = ov;
|
|
|
|
selmon->gappih = ih;
|
|
|
|
selmon->gappih = ih;
|
|
|
|
selmon->gappiv = iv;
|
|
|
|
selmon->gappiv = iv;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if PERTAG_VANITYGAPS_PATCH && PERTAG_PATCH
|
|
|
|
|
|
|
|
selmon->pertag->gaps[selmon->pertag->curtag] =
|
|
|
|
|
|
|
|
((oh & 0xFF) << 0) | ((ov & 0xFF) << 8) | ((ih & 0xFF) << 16) | ((iv & 0xFF) << 24);
|
|
|
|
|
|
|
|
#endif // PERTAG_VANITYGAPS_PATCH | PERTAG_PATCH
|
|
|
|
|
|
|
|
|
|
|
|
arrange(selmon);
|
|
|
|
arrange(selmon);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -60,13 +66,13 @@ setgapsex(const Arg *arg)
|
|
|
|
iv = (arg->i & 0x7f);
|
|
|
|
iv = (arg->i & 0x7f);
|
|
|
|
|
|
|
|
|
|
|
|
/* Auto enable gaps if disabled */
|
|
|
|
/* Auto enable gaps if disabled */
|
|
|
|
#if PERTAG_PATCH
|
|
|
|
#if PERTAG_VANITYGAPS_PATCH && PERTAG_PATCH
|
|
|
|
if (!selmon->pertag->enablegaps[selmon->pertag->curtag])
|
|
|
|
if (!selmon->pertag->enablegaps[selmon->pertag->curtag])
|
|
|
|
selmon->pertag->enablegaps[selmon->pertag->curtag] = 1;
|
|
|
|
selmon->pertag->enablegaps[selmon->pertag->curtag] = 1;
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
if (!enablegaps)
|
|
|
|
if (!enablegaps)
|
|
|
|
enablegaps = 1;
|
|
|
|
enablegaps = 1;
|
|
|
|
#endif // PERTAG_PATCH
|
|
|
|
#endif // PERTAG_VANITYGAPS_PATCH | PERTAG_PATCH
|
|
|
|
|
|
|
|
|
|
|
|
setgaps(oh, ov, ih, iv);
|
|
|
|
setgaps(oh, ov, ih, iv);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -75,11 +81,11 @@ setgapsex(const Arg *arg)
|
|
|
|
static void
|
|
|
|
static void
|
|
|
|
togglegaps(const Arg *arg)
|
|
|
|
togglegaps(const Arg *arg)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
#if PERTAG_PATCH
|
|
|
|
#if PERTAG_VANITYGAPS_PATCH && PERTAG_PATCH
|
|
|
|
selmon->pertag->enablegaps[selmon->pertag->curtag] = !selmon->pertag->enablegaps[selmon->pertag->curtag];
|
|
|
|
selmon->pertag->enablegaps[selmon->pertag->curtag] = !selmon->pertag->enablegaps[selmon->pertag->curtag];
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
enablegaps = !enablegaps;
|
|
|
|
enablegaps = !enablegaps;
|
|
|
|
#endif // PERTAG_PATCH
|
|
|
|
#endif // PERTAG_VANITYGAPS_PATCH | PERTAG_PATCH
|
|
|
|
arrange(NULL);
|
|
|
|
arrange(NULL);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|