X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=dwm.c;h=f46f069a5ee5ecdff35fba985e769ceea3919d75;hb=0528a37c791aa8d7b6a5fb8e712a9ce4dfb1cd12;hp=0c9acbe0fc265a60f6a74ca13e832f406a5f061c;hpb=825d6cb93a37f8c67a7c8b1a027e5eebc3f4dda7;p=dwm.git diff --git a/dwm.c b/dwm.c index 0c9acbe..f46f069 100644 --- a/dwm.c +++ b/dwm.c @@ -69,7 +69,7 @@ struct Client { int basew, baseh, incw, inch, maxw, maxh, minw, minh; int minax, maxax, minay, maxay; long flags; - uint bw, oldbw; + int bw, oldbw; Bool isbanned, isfixed, isfloating, isurgent; uint tags; Client *next; @@ -94,7 +94,7 @@ typedef struct { } DC; /* draw context */ typedef struct { - ulong mod; + uint mod; KeySym keysym; void (*func)(const void *arg); const void *arg; @@ -234,11 +234,10 @@ Window root, barwin; /* configuration, allows nested code to access above variables */ #include "config.h" -/* check if all tags will fit into a uint bitarray. */ -static char tags_is_a_sign_that_your_IQ[sizeof(int) * 8 < LENGTH(tags) ? -1 : 1]; +/* compile-time check if all tags fit into an uint bit array. */ +struct NumTags { char limitexceeded[sizeof(uint) * 8 < LENGTH(tags) ? -1 : 1]; }; /* function implementations */ - void applyrules(Client *c) { uint i; @@ -1548,14 +1547,6 @@ togglelayout(const void *arg) { void toggletag(const void *arg) { - int i, m = *(int *)arg; - for(i = 0; i < sizeof(int) * 8; i++) - fputc(m & 1 << i ? '1' : '0', stdout); - puts(""); - for(i = 0; i < sizeof(int) * 8; i++) - fputc(TAGMASK & 1 << i ? '1' : '0', stdout); - puts("aaa"); - if(sel && (sel->tags ^ ((*(int *)arg) & TAGMASK))) { sel->tags ^= (*(int *)arg) & TAGMASK; arrange();