diff options
| author | Anselm R Garbe <garbeam@gmail.com> | 2008-05-26 10:28:18 +0100 |
|---|---|---|
| committer | Anselm R Garbe <garbeam@gmail.com> | 2008-05-26 10:28:18 +0100 |
| commit | 32c5046635da102dd3b6789462234e3147b190ab (patch) | |
| tree | d3f4e1b6d1199e3c24350589e4afc09759d2bcef /dwm.c | |
| parent | renamed domax into ismax (diff) | |
| download | dwm-32c5046635da102dd3b6789462234e3147b190ab.tar.gz dwm-32c5046635da102dd3b6789462234e3147b190ab.zip | |
removed bx and bw, unnecessary
Diffstat (limited to 'dwm.c')
| -rw-r--r-- | dwm.c | 18 |
1 files changed, 8 insertions, 10 deletions
| @@ -193,7 +193,7 @@ void zoom(const void *arg); | |||
| 193 | /* variables */ | 193 | /* variables */ |
| 194 | char stext[256]; | 194 | char stext[256]; |
| 195 | int screen, sx, sy, sw, sh; | 195 | int screen, sx, sy, sw, sh; |
| 196 | int bx, by, bw, bh, blw, wx, wy, ww, wh; | 196 | int by, bh, blw, wx, wy, ww, wh; |
| 197 | uint seltags = 0; | 197 | uint seltags = 0; |
| 198 | int (*xerrorxlib)(Display *, XErrorEvent *); | 198 | int (*xerrorxlib)(Display *, XErrorEvent *); |
| 199 | uint numlockmask = 0; | 199 | uint numlockmask = 0; |
| @@ -506,10 +506,10 @@ drawbar(void) { | |||
| 506 | else | 506 | else |
| 507 | x = dc.x; | 507 | x = dc.x; |
| 508 | dc.w = TEXTW(stext); | 508 | dc.w = TEXTW(stext); |
| 509 | dc.x = bw - dc.w; | 509 | dc.x = ww - dc.w; |
| 510 | if(dc.x < x) { | 510 | if(dc.x < x) { |
| 511 | dc.x = x; | 511 | dc.x = x; |
| 512 | dc.w = bw - x; | 512 | dc.w = ww - x; |
| 513 | } | 513 | } |
| 514 | drawtext(stext, dc.norm, False); | 514 | drawtext(stext, dc.norm, False); |
| 515 | if((dc.w = dc.x - x) > bh) { | 515 | if((dc.w = dc.x - x) > bh) { |
| @@ -521,7 +521,7 @@ drawbar(void) { | |||
| 521 | else | 521 | else |
| 522 | drawtext(NULL, dc.norm, False); | 522 | drawtext(NULL, dc.norm, False); |
| 523 | } | 523 | } |
| 524 | XCopyArea(dpy, dc.drawable, barwin, dc.gc, 0, 0, bw, bh, 0, 0); | 524 | XCopyArea(dpy, dc.drawable, barwin, dc.gc, 0, 0, ww, bh, 0, 0); |
| 525 | XSync(dpy, False); | 525 | XSync(dpy, False); |
| 526 | } | 526 | } |
| 527 | 527 | ||
| @@ -1372,7 +1372,7 @@ setup(void) { | |||
| 1372 | wa.background_pixmap = ParentRelative; | 1372 | wa.background_pixmap = ParentRelative; |
| 1373 | wa.event_mask = ButtonPressMask|ExposureMask; | 1373 | wa.event_mask = ButtonPressMask|ExposureMask; |
| 1374 | 1374 | ||
| 1375 | barwin = XCreateWindow(dpy, root, bx, by, bw, bh, 0, DefaultDepth(dpy, screen), | 1375 | barwin = XCreateWindow(dpy, root, wx, by, ww, bh, 0, DefaultDepth(dpy, screen), |
| 1376 | CopyFromParent, DefaultVisual(dpy, screen), | 1376 | CopyFromParent, DefaultVisual(dpy, screen), |
| 1377 | CWOverrideRedirect|CWBackPixmap|CWEventMask, &wa); | 1377 | CWOverrideRedirect|CWBackPixmap|CWEventMask, &wa); |
| 1378 | XDefineCursor(dpy, barwin, cursor[CurNormal]); | 1378 | XDefineCursor(dpy, barwin, cursor[CurNormal]); |
| @@ -1567,8 +1567,8 @@ void | |||
| 1567 | updatebar(void) { | 1567 | updatebar(void) { |
| 1568 | if(dc.drawable != 0) | 1568 | if(dc.drawable != 0) |
| 1569 | XFreePixmap(dpy, dc.drawable); | 1569 | XFreePixmap(dpy, dc.drawable); |
| 1570 | dc.drawable = XCreatePixmap(dpy, root, bw, bh, DefaultDepth(dpy, screen)); | 1570 | dc.drawable = XCreatePixmap(dpy, root, ww, bh, DefaultDepth(dpy, screen)); |
| 1571 | XMoveResizeWindow(dpy, barwin, bx, by, bw, bh); | 1571 | XMoveResizeWindow(dpy, barwin, wx, by, ww, bh); |
| 1572 | } | 1572 | } |
| 1573 | 1573 | ||
| 1574 | void | 1574 | void |
| @@ -1595,10 +1595,8 @@ updategeom(void) { | |||
| 1595 | wh = showbar ? sh - bh : sh; | 1595 | wh = showbar ? sh - bh : sh; |
| 1596 | } | 1596 | } |
| 1597 | 1597 | ||
| 1598 | /* bar geometry */ | 1598 | /* bar position */ |
| 1599 | bx = wx; | ||
| 1600 | by = showbar ? (topbar ? wy - bh : wy + wh) : -bh; | 1599 | by = showbar ? (topbar ? wy - bh : wy + wh) : -bh; |
| 1601 | bw = ww; | ||
| 1602 | } | 1600 | } |
| 1603 | 1601 | ||
| 1604 | void | 1602 | void |
