diff options
Diffstat (limited to 'x.c')
-rw-r--r-- | x.c | 31 |
1 files changed, 14 insertions, 17 deletions
@@ -319,13 +319,13 @@ numlock(const Arg *dummy) void changealpha(const Arg *arg) { - if((alpha > 0 && arg->f < 0) || (alpha < 1 && arg->f > 0)) - alpha += arg->f; - alpha = clamp(alpha, 0.0, 1.0); - alphaUnfocus = clamp(alpha-alphaOffset, 0.0, 1.0); + if((alpha > 0 && arg->f < 0) || (alpha < 1 && arg->f > 0)) + alpha += arg->f; + alpha = clamp(alpha, 0.0, 1.0); + alphaUnfocus = clamp(alpha-alphaOffset, 0.0, 1.0); - xloadcols(); - redraw(); + xloadcols(); + redraw(); } void @@ -383,11 +383,11 @@ evrow(XEvent *e) float clamp(float value, float lower, float upper) { - if(value < lower) - return lower; - if(value > upper) - return upper; - return value; + if(value < lower) + return lower; + if(value > upper) + return upper; + return value; } void @@ -1663,8 +1663,7 @@ xdrawglyphfontspecs(const XftGlyphFontSpec *specs, Glyph base, int len, int x, i /* Render underline and strikethrough. */ if (base.mode & ATTR_UNDERLINE) { - XftDrawRect(xw.draw, fg, winx, winy + dc.font.ascent + 1, - width, 1); + XftDrawRect(xw.draw, fg, winx, winy + dc.font.ascent + 1, width, 1); } if (base.mode & ATTR_STRUCK) { @@ -2229,10 +2228,8 @@ resource_load(XrmDatabase db, char *name, enum resource_type rtype, void *dst) char *type; XrmValue ret; - snprintf(fullname, sizeof(fullname), "%s.%s", - opt_name ? opt_name : "st", name); - snprintf(fullclass, sizeof(fullclass), "%s.%s", - opt_class ? opt_class : "St", name); + snprintf(fullname, sizeof(fullname), "%s.%s","st", name); + snprintf(fullclass, sizeof(fullclass), "%s.%s", "St", name); fullname[sizeof(fullname) - 1] = fullclass[sizeof(fullclass) - 1] = '\0'; XrmGetResource(db, fullname, fullclass, &type, &ret); |