NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: xsrc/40242: xkb: Alternative layouts don't work due to groups "invented" by the server (on both native and pkgsrc xorg)



The attached test application can reproduce the issue.

$ cc `pkg-config --cflags x11` pr40242.c -o pr40242 `pkg-config --libs x11`
$ ./pr40242
XkbGetKeyboard(ff) returned 0x0
XkbGetKeyboard(bf) returned 0x7f7ffd308110

Cheers,
Jared
#include <stdio.h>
#include <stdlib.h>

#include <X11/Xlib.h>
#include <X11/XKBlib.h>

int
main(void)
{
        Display *display;
        XkbDescPtr xkb;
        int which;

        display = XOpenDisplay(getenv("DISPLAY"));
        if (!display) {
                (void)fprintf(stderr, "couldn't open display\n");
                return 1;
        }

        which = XkbGBN_AllComponentsMask;
        xkb = XkbGetKeyboard(display, which, XkbUseCoreKbd);
        printf("XkbGetKeyboard(%x) returned %p\n", which, xkb);

        which = XkbGBN_AllComponentsMask & ~XkbGBN_GeometryMask;
        xkb = XkbGetKeyboard(display, which, XkbUseCoreKbd);
        printf("XkbGetKeyboard(%x) returned %p\n", which, xkb);

        return 0;
}


Home | Main Index | Thread Index | Old Index