{ ControlMask, XK_Print, toggleprinter, {.i = 0} },
{ ShiftMask, XK_Print, printscreen, {.i = 0} },
{ XK_ANY_MOD, XK_Print, printsel, {.i = 0} },
- { MODKEY|ShiftMask, XK_Prior, xzoom, {.i = +1} },
- { MODKEY|ShiftMask, XK_Next, xzoom, {.i = -1} },
- { MODKEY|ShiftMask, XK_Home, xzoomreset, {.i = 0} },
+ { MODKEY|ShiftMask, XK_Prior, xzoom, {.f = +1} },
+ { MODKEY|ShiftMask, XK_Next, xzoom, {.f = -1} },
+ { MODKEY|ShiftMask, XK_Home, xzoomreset, {.f = 0} },
{ ShiftMask, XK_Insert, selpaste, {.i = 0} },
{ MODKEY|ShiftMask, XK_Insert, clippaste, {.i = 0} },
{ MODKEY|ShiftMask, XK_C, clipcopy, {.i = 0} },
void
xloadfonts(char *fontstr, double fontsize) {
FcPattern *pattern;
- FcResult r_sz, r_psz;
double fontval;
float ceilf(float);
FcPatternAddDouble(pattern, FC_PIXEL_SIZE, (double)fontsize);
usedfontsize = fontsize;
} else {
- r_psz = FcPatternGetDouble(pattern, FC_PIXEL_SIZE, 0, &fontval);
- r_sz = FcPatternGetDouble(pattern, FC_SIZE, 0, &fontval);
- if(r_psz == FcResultMatch) {
+ if(FcPatternGetDouble(pattern, FC_PIXEL_SIZE, 0, &fontval) ==
+ FcResultMatch) {
usedfontsize = fontval;
- } else if(r_sz == FcResultMatch) {
+ } else if(FcPatternGetDouble(pattern, FC_SIZE, 0, &fontval) ==
+ FcResultMatch) {
usedfontsize = -1;
} else {
/*
xzoom(const Arg *arg) {
Arg larg;
- larg.i = usedfontsize + arg->i;
+ larg.f = usedfontsize + arg->f;
xzoomabs(&larg);
}
void
xzoomabs(const Arg *arg) {
xunloadfonts();
- xloadfonts(usedfont, arg->i);
+ xloadfonts(usedfont, arg->f);
cresize(0, 0);
redraw();
xhints();
Arg larg;
if(defaultfontsize > 0) {
- larg.i = defaultfontsize;
+ larg.f = defaultfontsize;
xzoomabs(&larg);
}
}