[wiki] [sites] wiki updated
changeset: 185:b25edc1a4c94
tag: tip
user: kzed_AT_eris
date: Mon Aug 24 17:31:47 2009 +0200
files: dwm.suckless.org/patches/fancybar-5.6.1.diff dwm.suckless.org/patches/fancybar-r1483.diff dwm.suckless.org/patches/fancybar.md
description:
fixed title change update on another monitor bug in fancybar patch
diff -r e41d9e433957 -r b25edc1a4c94 dwm.suckless.org/patches/fancybar-5.6.1.diff
--- a/dwm.suckless.org/patches/fancybar-5.6.1.diff Mon Aug 24 17:17:46 2009 +0200
+++ b/dwm.suckless.org/patches/fancybar-5.6.1.diff Mon Aug 24 17:31:47 2009 +0200
_AT_@ -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
_AT_@ -648,10 +648,11 @@
void
_AT_@ -84,3 +84,13 @@
XCopyArea(dpy, dc.drawable, m->barwin, dc.gc, 0, 0, m->ww, bh, 0, 0);
XSync(dpy, False);
}
+_AT_@ -1235,8 +1281,7 @@
+ }
+ if(ev->atom == XA_WM_NAME || ev->atom == netatom[NetWMName]) {
+ updatetitle(c);
+- if(c == selmon->sel)
+- drawbars();
++ drawbars();
+ }
+ }
+ }
diff -r e41d9e433957 -r b25edc1a4c94 dwm.suckless.org/patches/fancybar-r1483.diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm.suckless.org/patches/fancybar-r1483.diff Mon Aug 24 17:31:47 2009 +0200
_AT_@ -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
+_AT_@ -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))
+_AT_@ -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);
+ }
+_AT_@ -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 -r e41d9e433957 -r b25edc1a4c94 dwm.suckless.org/patches/fancybar.md
--- a/dwm.suckless.org/patches/fancybar.md Mon Aug 24 17:17:46 2009 +0200
+++ b/dwm.suckless.org/patches/fancybar.md Mon Aug 24 17:31:47 2009 +0200
_AT_@ -12,7 +12,8 @@
## 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
Received on Mon Aug 24 2009 - 17:32:23 CEST
This archive was generated by hypermail 2.3.0
: Thu Sep 13 2012 - 19:30:44 CEST