CrunchBang Linux Pastebin - collaborative debugging

pastebin is a collaborative debugging tool allowing you to share and modify code snippets while chatting on IRC, IM or a message board.

This site is developed to XHTML and CSS2 W3C standards. If you see this paragraph, your browser does not support those standards and you need to upgrade. Visit WaSP for a variety of options.

CrunchBang Linux Pastebin

Posted by pnd4 on Fri 18th Jan 08:35 (modification of post by view diff)
download | new post

  1. ## PND4 - o1.18.13
  2. #
  3. # Patch for dwm-6.0, enables independent 'tagsets' for multiple-display
  4. # support. Incompatible with most perftag patches it seems.
  5. #
  6.  
  7. --- dwm-6.0-vanilla/dwm-6.0/dwm.c-2011-12-19 07:02:46.000000000 -0800                                                                                                                                                                       
  8. +++ dwm-6.0/dwm.c-2013-01-17 18:48:26.496552869 -0800
  9.  -52,7 +52,7 @@
  10.  #define MOUSEMASK               (BUTTONMASK|PointerMotionMask)
  11.  #define WIDTH(X)                ((X)->w + 2 * (X)->bw)
  12.  #define HEIGHT(X)               ((X)->h + 2 * (X)->bw)
  13. -#define TAGMASK                 ((1 << LENGTH(tags)) - 1)
  14. +#define TAGMASK                 ((1 << LENGTH(tags[0])) - 1)
  15.  #define TEXTW(X)                (textnw(X, strlen(X)) + dc.font.height)
  16. .
  17.  /* enums */
  18.  -288,7 +288,7 @@
  19.  #include "config.h"
  20. .
  21.  /* compile-time check if all tags fit into an unsigned int bit array. */
  22. -struct NumTags { char limitexceeded[LENGTH(tags) > 31 ? -1 : 1]; };
  23. +struct NumTags { char limitexceeded[LENGTH(tags[0]) > 31 ? -1 : 1]; };
  24. .
  25.  /* function implementations */
  26.  void
  27.  -441,9 +441,9 @@
  28.  -if(ev->window == selmon->barwin) {
  29.  -->i = x = 0;
  30.  -->do
  31. --->->x += TEXTW(tags[i]);
  32. --->while(ev->x >= x && ++i < LENGTH(tags));
  33. --->if(i < LENGTH(tags)) {
  34. +-->->x += TEXTW(tags[selmon->num][i]);
  35. +-->while(ev->x >= x && ++i < LENGTH(tags[0]));
  36. +-->if(i < LENGTH(tags[0])) {
  37.  -->->click = ClkTagBar;
  38.  -->->arg.ui = 1 << i;
  39.  -->}
  40.  -728,10 +728,10 @@
  41.  -->->urg |= c->tags;
  42.  -}
  43.  -dc.x = 0;
  44. --for(i = 0; i < LENGTH(tags); i++) {
  45. --->dc.w = TEXTW(tags[i]);
  46. +-for(i = 0; i < LENGTH(tags[0]); i++) {
  47. +-->dc.w = TEXTW(tags[m->num][i]);
  48.  -->col = m->tagset[m->seltags] & 1 << i ? dc.sel : dc.norm;
  49. --->drawtext(tags[i], col, urg & 1 << i);
  50. +-->drawtext(tags[m->num][i], col, urg & 1 << i);
  51.  -->drawsquare(m == selmon && selmon->sel && selmon->sel->tags & 1 << i,
  52.  -->           occ & 1 << i, urg & 1 << i, col);
  53.  -->dc.x += dc.w;

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with @@


Remember me