sites

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 17ec4eae7b579f9c9cf321e60d37d1e311af9350
parent 42d849146503332ce67822c41e42e16b1b1f9e7f
Author: kzed@eris <unknown>
Date:   Mon, 24 Aug 2009 17:31:47 +0200

fixed title change update on another monitor bug in fancybar patch
Diffstat:
Mdwm.suckless.org/patches/fancybar-5.6.1.diff | 12+++++++++++-
Adwm.suckless.org/patches/fancybar-r1483.diff | 96+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mdwm.suckless.org/patches/fancybar.md | 3++-
3 files changed, 109 insertions(+), 2 deletions(-)

diff --git a/dwm.suckless.org/patches/fancybar-5.6.1.diff b/dwm.suckless.org/patches/fancybar-5.6.1.diff @@ -1,6 +1,6 @@ diff -r e47a47bd3ed4 dwm.c --- a/dwm.c Tue Jul 21 10:57:54 2009 +0100 -+++ b/dwm.c Mon Aug 17 16:28:08 2009 +0200 ++++ b/dwm.c Mon Aug 24 17:22:55 2009 +0200 @@ -648,10 +648,11 @@ void @@ -84,3 +84,13 @@ diff -r e47a47bd3ed4 dwm.c XCopyArea(dpy, dc.drawable, m->barwin, dc.gc, 0, 0, m->ww, bh, 0, 0); XSync(dpy, False); } +@@ -1235,8 +1281,7 @@ + } + if(ev->atom == XA_WM_NAME || ev->atom == netatom[NetWMName]) { + updatetitle(c); +- if(c == selmon->sel) +- drawbars(); ++ drawbars(); + } + } + } diff --git a/dwm.suckless.org/patches/fancybar-r1483.diff b/dwm.suckless.org/patches/fancybar-r1483.diff @@ -0,0 +1,96 @@ +diff -r 63e19dad219c dwm.c +--- a/dwm.c Tue Aug 18 15:59:38 2009 +0100 ++++ b/dwm.c Mon Aug 24 17:26:52 2009 +0200 +@@ -648,10 +648,11 @@ + + void + drawbar(Monitor *m) { +- int x; ++ int x, ow, mw = 0, extra, tw; + unsigned int i, n = 0, occ = 0, urg = 0; + unsigned long *col; +- Client *c; ++ Client *c, *firstvis, *lastvis = NULL; ++ DC seldc; + + for(c = m->clients; c; c = c->next) { + if(ISVISIBLE(c)) +@@ -689,16 +690,61 @@ + } + else + dc.x = m->ww; +- if((dc.w = dc.x - x) > bh) { +- dc.x = x; +- if(m->sel) { +- col = m == selmon ? dc.sel : dc.norm; +- drawtext(m->sel->name, col, False); +- drawsquare(m->sel->isfixed, m->sel->isfloating, False, col); ++ ++ for(c = m->clients; c && !ISVISIBLE(c); c = c->next); ++ firstvis = c; ++ ++ col = m == selmon ? dc.sel : dc.norm; ++ dc.w = dc.x - x; ++ dc.x = x; ++ ++ if(n > 0) { ++ mw = dc.w / n; ++ extra = 0; ++ seldc = dc; ++ i = 0; ++ ++ while(c) { ++ lastvis = c; ++ tw = TEXTW(c->name); ++ if(tw < mw) extra += (mw - tw); else i++; ++ for(c = c->next; c && !ISVISIBLE(c); c = c->next); + } +- else ++ ++ if(i > 0) mw += extra / i; ++ ++ c = firstvis; ++ x = dc.x; ++ } ++ ++ while(dc.w > bh) { ++ if(c) { ++ ow = dc.w; ++ tw = TEXTW(c->name); ++ dc.w = MIN(ow, tw); ++ ++ if(dc.w > mw) dc.w = mw; ++ if(m->sel == c) seldc = dc; ++ if(c == lastvis) dc.w = ow; ++ ++ drawtext(c->name, col, False); ++ drawsquare(c->isfixed, c->isfloating, False, col); ++ ++ dc.x += dc.w; ++ dc.w = ow - dc.w; ++ for(c = c->next; c && !ISVISIBLE(c); c = c->next); ++ } else { + drawtext(NULL, dc.norm, False); ++ break; ++ } + } ++ ++ if(m == selmon && m->sel && ISVISIBLE(m->sel)) { ++ dc = seldc; ++ drawtext(m->sel->name, col, True); ++ drawsquare(m->sel->isfixed, m->sel->isfloating, True, col); ++ } ++ + XCopyArea(dpy, dc.drawable, m->barwin, dc.gc, 0, 0, m->ww, bh, 0, 0); + XSync(dpy, False); + } +@@ -1235,8 +1281,7 @@ + } + if(ev->atom == XA_WM_NAME || ev->atom == netatom[NetWMName]) { + updatetitle(c); +- if(c == c->mon->sel) +- drawbar(c->mon); ++ drawbar(c->mon); + } + } + } diff --git a/dwm.suckless.org/patches/fancybar.md b/dwm.suckless.org/patches/fancybar.md @@ -12,7 +12,8 @@ fit, they're cropped. The title of the selected window is inverted. ## Download - * [fancybar-5.6.1.diff](fancybar-5.6.1.diff) (1.8K) (20090818) + * [fancybar-5.6.1.diff](fancybar-5.6.1.diff) (2.0K) (20090824) + * [fancybar-r1483.diff](fancybar-r1483.diff) (2.0K) (20090824) ## Author