Browse Source

applied Gottox patches

master
arg@mig29 18 years ago
parent
commit
931e712eac
3 changed files with 6 additions and 8 deletions
  1. +1
    -1
      config.mk
  2. +2
    -5
      draw.c
  3. +3
    -2
      main.c

+ 1
- 1
config.mk View File

@ -1,5 +1,5 @@
# dwm version # dwm version
VERSION = 2.2
VERSION = 2.3
# Customize below to fit your system # Customize below to fit your system


+ 2
- 5
draw.c View File

@ -99,7 +99,7 @@ drawstatus(void) {
drawtext(arrange == dofloat ? FLOATSYMBOL : TILESYMBOL, dc.status, False); drawtext(arrange == dofloat ? FLOATSYMBOL : TILESYMBOL, dc.status, False);
x = dc.x + dc.w; x = dc.x + dc.w;
dc.w = textw(stext); dc.w = textw(stext);
dc.x = bx + bw - dc.w;
dc.x = bw - dc.w;
if(dc.x < x) { if(dc.x < x) {
dc.x = x; dc.x = x;
dc.w = bw - x; dc.w = bw - x;
@ -107,10 +107,7 @@ drawstatus(void) {
drawtext(stext, dc.status, False); drawtext(stext, dc.status, False);
if((dc.w = dc.x - x) > bh) { if((dc.w = dc.x - x) > bh) {
dc.x = x; dc.x = x;
if(sel)
drawtext(sel->name, dc.sel, False);
else
drawtext(NULL, dc.norm, False);
drawtext(sel ? sel->name : NULL, dc.sel, False);
} }
XCopyArea(dpy, dc.drawable, barwin, dc.gc, 0, 0, bw, bh, 0, 0); XCopyArea(dpy, dc.drawable, barwin, dc.gc, 0, 0, bw, bh, 0, 0);
XSync(dpy, False); XSync(dpy, False);


+ 3
- 2
main.c View File

@ -130,7 +130,8 @@ setup(void) {
sh = DisplayHeight(dpy, screen); sh = DisplayHeight(dpy, screen);
master = MASTER; master = MASTER;
/* bar */ /* bar */
bx = by = 0;
bx = sx;
by = sy;
bw = sw; bw = sw;
dc.h = bh = dc.font.height + 2; dc.h = bh = dc.font.height + 2;
wa.override_redirect = 1; wa.override_redirect = 1;
@ -144,7 +145,7 @@ setup(void) {
strcpy(stext, "dwm-"VERSION); strcpy(stext, "dwm-"VERSION);
/* windowarea */ /* windowarea */
wax = sx; wax = sx;
way = bh;
way = sy + bh;
wah = sh - bh; wah = sh - bh;
waw = sw; waw = sw;
/* pixmap for everything */ /* pixmap for everything */


Loading…
Cancel
Save