Completed switchgaps func

pull/25/head
E. Almqvist 3 years ago
parent 0553ca905d
commit ab39db55ba
  1. 7
      src/dwm.c

@ -315,6 +315,8 @@ static Window root, wmcheckwin;
/* configuration, allows nested code to access above variables */ /* configuration, allows nested code to access above variables */
#include "config.h" #include "config.h"
const unsigned int modeslen = (const unsigned int)(sizeof(modeslen) / sizeof(const unsigned int));
#ifdef VERSION #ifdef VERSION
#include "IPCClient.c" #include "IPCClient.c"
#include "yajl_dumps.c" #include "yajl_dumps.c"
@ -1854,9 +1856,10 @@ togglegaps(const Arg *arg)
void void
switchgaps(const Arg *arg) switchgaps(const Arg *arg)
{ {
const unsigned int modeslen = (const unsigned int)(sizeof(modeslen) / sizeof(const unsigned int));
selmon->gapidx = (selmon->gapidx + arg->i) % modeslen; selmon->gapidx = (selmon->gapidx + arg->i) % modeslen;
selmon->gappx = gapmodes[selmon->gapidx];
arrange(selmon);
} }
void void

Loading…
Cancel
Save