diff options
| author | Anselm R Garbe <garbeam@gmail.com> | 2009-07-09 11:29:01 +0100 |
|---|---|---|
| committer | Anselm R Garbe <garbeam@gmail.com> | 2009-07-09 11:29:01 +0100 |
| commit | 565050ac51687bbd4f388c6aeb2298db94430efb (patch) | |
| tree | a809afd143c5a1711d282782391264daa3ab04c9 /dwm.c | |
| parent | restricting number of mons by length of monsyms (diff) | |
| download | dwm-565050ac51687bbd4f388c6aeb2298db94430efb.tar.gz dwm-565050ac51687bbd4f388c6aeb2298db94430efb.zip | |
removed monsyms, useless
Diffstat (limited to 'dwm.c')
| -rw-r--r-- | dwm.c | 15 |
1 files changed, 3 insertions, 12 deletions
| @@ -123,7 +123,7 @@ typedef struct { | |||
| 123 | struct Monitor { | 123 | struct Monitor { |
| 124 | int screen_number; | 124 | int screen_number; |
| 125 | float mfact; | 125 | float mfact; |
| 126 | int by, btx; /* bar geometry */ | 126 | int by; /* bar geometry */ |
| 127 | int mx, my, mw, mh; /* screen size */ | 127 | int mx, my, mw, mh; /* screen size */ |
| 128 | int wx, wy, ww, wh; /* window area */ | 128 | int wx, wy, ww, wh; /* window area */ |
| 129 | unsigned int seltags; | 129 | unsigned int seltags; |
| @@ -409,9 +409,8 @@ buttonpress(XEvent *e) { | |||
| 409 | selmon = m; | 409 | selmon = m; |
| 410 | focus(NULL); | 410 | focus(NULL); |
| 411 | } | 411 | } |
| 412 | if(ev->window == selmon->barwin && ev->x >= selmon->btx) { | 412 | if(ev->window == selmon->barwin) { |
| 413 | i = 0; | 413 | i = x = 0; |
| 414 | x = selmon->btx; | ||
| 415 | do | 414 | do |
| 416 | x += TEXTW(tags[i]); | 415 | x += TEXTW(tags[i]); |
| 417 | while(ev->x >= x && ++i < LENGTH(tags)); | 416 | while(ev->x >= x && ++i < LENGTH(tags)); |
| @@ -652,12 +651,6 @@ drawbar(Monitor *m) { | |||
| 652 | urg |= c->tags; | 651 | urg |= c->tags; |
| 653 | } | 652 | } |
| 654 | dc.x = 0; | 653 | dc.x = 0; |
| 655 | if(mons->next) { /* more than a single monitor */ | ||
| 656 | dc.w = TEXTW(monsyms[m->screen_number]); | ||
| 657 | drawtext(monsyms[m->screen_number], selmon == m ? dc.sel : dc.norm, False); | ||
| 658 | dc.x += dc.w; | ||
| 659 | } | ||
| 660 | m->btx = dc.x; | ||
| 661 | for(i = 0; i < LENGTH(tags); i++) { | 654 | for(i = 0; i < LENGTH(tags); i++) { |
| 662 | dc.w = TEXTW(tags[i]); | 655 | dc.w = TEXTW(tags[i]); |
| 663 | col = m->tagset[m->seltags] & 1 << i ? dc.sel : dc.norm; | 656 | col = m->tagset[m->seltags] & 1 << i ? dc.sel : dc.norm; |
| @@ -1690,8 +1683,6 @@ updategeom(void) { | |||
| 1690 | if(XineramaIsActive(dpy)) | 1683 | if(XineramaIsActive(dpy)) |
| 1691 | info = XineramaQueryScreens(dpy, &n); | 1684 | info = XineramaQueryScreens(dpy, &n); |
| 1692 | #endif /* XINERAMA */ | 1685 | #endif /* XINERAMA */ |
| 1693 | if(n > LENGTH(monsyms)) | ||
| 1694 | n = LENGTH(monsyms); | ||
| 1695 | /* allocate monitor(s) for the new geometry setup */ | 1686 | /* allocate monitor(s) for the new geometry setup */ |
| 1696 | for(i = 0; i < n; i++) { | 1687 | for(i = 0; i < n; i++) { |
| 1697 | if(!(m = (Monitor *)malloc(sizeof(Monitor)))) | 1688 | if(!(m = (Monitor *)malloc(sizeof(Monitor)))) |
