diff options
| author | Anselm R. Garbe <arg@suckless.org> | 2007-05-15 13:36:04 +0200 |
|---|---|---|
| committer | Anselm R. Garbe <arg@suckless.org> | 2007-05-15 13:36:04 +0200 |
| commit | 37e062b0ed475fb6d9030f05b353c4fb79b7c6e5 (patch) | |
| tree | 0a767ea06c0563dcb1d2b0386c61851d3d663d11 | |
| parent | fixed bpos init (diff) | |
| download | dwm-37e062b0ed475fb6d9030f05b353c4fb79b7c6e5.tar.gz dwm-37e062b0ed475fb6d9030f05b353c4fb79b7c6e5.zip | |
another fix, call lt->arrange() in togglebar only
| -rw-r--r-- | config.mk | 4 | ||||
| -rw-r--r-- | layout.c | 1 | ||||
| -rw-r--r-- | main.c | 6 |
3 files changed, 6 insertions, 5 deletions
| @@ -17,8 +17,8 @@ LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 | |||
| 17 | # flags | 17 | # flags |
| 18 | CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\" | 18 | CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\" |
| 19 | LDFLAGS = ${LIBS} | 19 | LDFLAGS = ${LIBS} |
| 20 | #CFLAGS = -g -Wall -O2 ${INCS} -DVERSION=\"${VERSION}\" | 20 | CFLAGS = -g -Wall -O2 ${INCS} -DVERSION=\"${VERSION}\" |
| 21 | #LDFLAGS = -g ${LIBS} | 21 | LDFLAGS = -g ${LIBS} |
| 22 | 22 | ||
| 23 | # Solaris | 23 | # Solaris |
| 24 | #CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\" | 24 | #CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\" |
| @@ -220,6 +220,7 @@ void | |||
| 220 | togglebar(const char *arg) { | 220 | togglebar(const char *arg) { |
| 221 | bpos = (bpos == BarOff) ? BARPOS : BarOff; | 221 | bpos = (bpos == BarOff) ? BARPOS : BarOff; |
| 222 | updatebarpos(); | 222 | updatebarpos(); |
| 223 | lt->arrange(); | ||
| 223 | } | 224 | } |
| 224 | 225 | ||
| 225 | void | 226 | void |
| @@ -190,7 +190,7 @@ setup(void) { | |||
| 190 | wa.override_redirect = 1; | 190 | wa.override_redirect = 1; |
| 191 | wa.background_pixmap = ParentRelative; | 191 | wa.background_pixmap = ParentRelative; |
| 192 | wa.event_mask = ButtonPressMask | ExposureMask; | 192 | wa.event_mask = ButtonPressMask | ExposureMask; |
| 193 | barwin = XCreateWindow(dpy, root, sx, sy - bh, sw, bh, 0, | 193 | barwin = XCreateWindow(dpy, root, sx, sy, sw, bh, 0, |
| 194 | DefaultDepth(dpy, screen), CopyFromParent, DefaultVisual(dpy, screen), | 194 | DefaultDepth(dpy, screen), CopyFromParent, DefaultVisual(dpy, screen), |
| 195 | CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa); | 195 | CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa); |
| 196 | XDefineCursor(dpy, barwin, cursor[CurNormal]); | 196 | XDefineCursor(dpy, barwin, cursor[CurNormal]); |
| @@ -232,7 +232,7 @@ updatebarpos(void) { | |||
| 232 | wah = sh; | 232 | wah = sh; |
| 233 | waw = sw; | 233 | waw = sw; |
| 234 | switch(bpos) { | 234 | switch(bpos) { |
| 235 | case BarTop: | 235 | default: |
| 236 | wah -= bh; | 236 | wah -= bh; |
| 237 | way += bh; | 237 | way += bh; |
| 238 | XMoveWindow(dpy, barwin, sx, sy); | 238 | XMoveWindow(dpy, barwin, sx, sy); |
| @@ -243,8 +243,8 @@ updatebarpos(void) { | |||
| 243 | break; | 243 | break; |
| 244 | case BarOff: | 244 | case BarOff: |
| 245 | XMoveWindow(dpy, barwin, sx, sy - bh); | 245 | XMoveWindow(dpy, barwin, sx, sy - bh); |
| 246 | break; | ||
| 246 | } | 247 | } |
| 247 | lt->arrange(); | ||
| 248 | } | 248 | } |
| 249 | 249 | ||
| 250 | /* There's no way to check accesses to destroyed windows, thus those cases are | 250 | /* There's no way to check accesses to destroyed windows, thus those cases are |
