Futher XKB initialization improvements. - sam - An updated version of the sam text editor.
 (HTM) git clone git://vernunftzentrum.de/sam.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) LICENSE
       ---
 (DIR) commit f13f9b0ce3c5bbe21d9183332c3f373157170db4
 (DIR) parent 7dd7ed120e00456486c99a3a64a2290402f6c92b
 (HTM) Author: Rob King <jking@deadpixi.com>
       Date:   Wed, 30 Nov 2016 16:18:42 -0600
       
       Futher XKB initialization improvements.
       
       Diffstat:
         libXg/xtbinit.c                     |       9 +++++++--
       
       1 file changed, 7 insertions(+), 2 deletions(-)
       ---
 (DIR) diff --git a/libXg/xtbinit.c b/libXg/xtbinit.c
       @@ -208,11 +208,16 @@ xtbinit(Errfunc f, char *class, int *pargc, char **argv, char **fallbacks)
            atexit(freebindings);
            atexit(freechords);
        
       -    int ignored;
       -    if (XkbQueryExtension(_dpy, &ignored, &ignored, &ignored, &ignored, &ignored) != True){
       +    int xkbmajor = XkbMajorVersion;
       +    int xkbminor = XkbMinorVersion;
       +    int xkbop    = 0;
       +    int xkbevent = 0;
       +    int xkberr   = 0;
       +    if (XkbQueryExtension(_dpy, &xkbop, &xkbevent, &xkberr, &xkbmajor, &xkbminor) == False){
                fprintf(stderr, "could not initialize X Keyboard Extension\n");
                exit(EXIT_FAILURE);
            }
       +
            xkb = XkbGetKeyboard(_dpy, XkbAllComponentsMask, XkbUseCoreKbd);
        
            font = XftFontOpenName(_dpy, DefaultScreen(_dpy), fontspec[0] ? fontspec : getenv("FONT") ? getenv("FONT") : "monospace");