diff options
author | Philip J. Freeman <elektron@halo.nu> | 2018-04-11 12:54:53 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2018-04-11 16:52:12 -0700 |
commit | 4183fbdc44fd34473e0d99e2ac3034340f06763e (patch) | |
tree | 117f467aafd39718cb8e9dc375f0aacf665363d4 /src | |
parent | d3f66266f01283d8a9e78ac0ffa9620d34d24850 (diff) |
logo: fix an edge case where logo is drawn forever
height = 2560 /3 = 853
while ( height -= 2) { // never hits 0
...
}
Diffstat (limited to 'src')
-rw-r--r-- | src/logo.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -43,7 +43,7 @@ void vwm_draw_logo(vwm_t *vwm) height /= 3; /* the logo gets shrunken vertically until it's essentially a flat line */ - while (height -= 2) { + while (height > 0 && width > 0) { /* scale and center the points to the screen size */ for (i = 0; i < VWM_LOGO_POINTS; i++) { points[i].x = xoff + (i * .2 * (float)width); @@ -60,6 +60,7 @@ void vwm_draw_logo(vwm_t *vwm) yoff++; width -= 4; xoff += 2; + height -= 2; } XUngrabServer(VWM_XDISPLAY(vwm)); |