summaryrefslogtreecommitdiffstats
path: root/dwm.c
diff options
context:
space:
mode:
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/dwm.c b/dwm.c
index fa5fdea..07d0d36 100644
--- a/dwm.c
+++ b/dwm.c
@@ -123,7 +123,7 @@ typedef struct {
123struct Monitor { 123struct 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))))