distributetags.c (533B)
1 void 2 distributetags(const Arg *arg) 3 { 4 Client *c; 5 unsigned int ui = 1; 6 int i = 0; 7 8 #if TAGSYNC_PATCH 9 Monitor *origselmon = selmon; 10 for (selmon = mons; selmon; selmon = selmon->next) { 11 #endif // TAGSYNC_PATCH 12 13 for (c = selmon->clients; c; c = c->next) { 14 if (HIDDEN(c)) 15 continue; 16 if (!(c->tags & TAGMASK)) 17 continue; 18 c->tags = (ui << i) & TAGMASK; 19 i = (i + 1) % NUMTAGS; 20 } 21 22 #if TAGSYNC_PATCH 23 } 24 selmon = origselmon; 25 arrange(NULL); 26 focus(NULL); 27 #else 28 arrange(selmon); 29 focus(NULL); 30 #endif // TAGSYNC_PATCH 31 }