X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=st.c;h=163f160a9bfed2e09016bf78fc307b432102d997;hb=4682cc9596a5c82325882bdf1313728de95467d2;hp=6dcf0c72157f4cae9c841184f991aca9baea0586;hpb=08e06ef079e5190c7f219c7e50044745c57cea86;p=st.git diff --git a/st.c b/st.c index 6dcf0c7..163f160 100644 --- a/st.c +++ b/st.c @@ -436,7 +436,7 @@ typedef struct { * the current length of used elements. */ -static Fontcache frc[256]; +static Fontcache frc[2048]; static int frccur = -1, frclen = 0; ssize_t @@ -2503,9 +2503,17 @@ xinit(void) { xw.draw = XftDrawCreate(xw.dpy, xw.buf, xw.vis, xw.cmap); /* input methods */ - xw.xim = XOpenIM(xw.dpy, NULL, NULL, NULL); - if(xw.xim == NULL) - die("XOpenIM failed. Could not open input device.\n"); + if((xw.xim = XOpenIM(xw.dpy, NULL, NULL, NULL)) == NULL) { + XSetLocaleModifiers("@im=local"); + if((xw.xim = XOpenIM(xw.dpy, NULL, NULL, NULL)) == NULL) { + XSetLocaleModifiers("@im="); + if((xw.xim = XOpenIM(xw.dpy, + NULL, NULL, NULL)) == NULL) { + die("XOpenIM failed. Could not open input" + " device.\n"); + } + } + } xw.xic = XCreateIC(xw.xim, XNInputStyle, XIMPreeditNothing | XIMStatusNothing, XNClientWindow, xw.win, XNFocusWindow, xw.win, NULL); @@ -2542,7 +2550,6 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) { FcPattern *fcpattern, *fontpattern; FcFontSet *fcsets[] = { NULL }; FcCharSet *fccharset; - XGlyphInfo extents; Colour *fg = &dc.col[base.fg], *bg = &dc.col[base.bg], *temp, revfg, revbg; XRenderColor colfg, colbg;