From 3365b523843f00ff7bd3c3fddebba9972a6cdaba Mon Sep 17 00:00:00 2001 From: David Edmondson Date: Wed, 23 Jan 2013 16:21:07 +0000 Subject: [PATCH] Allow servers which do not support the XKB extension. If we can open the X display but the XKB extension is not available, continue without it. --- src/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.c b/src/main.c index 7f576d43..a49241dd 100644 --- a/src/main.c +++ b/src/main.c @@ -595,13 +595,13 @@ int main(int argc, char *argv[]) { int i1; if (!XkbQueryExtension(xkbdpy,&i1,&xkb_event_base,&errBase,&major,&minor)) { fprintf(stderr, "XKB not supported by X-server\n"); - return 1; + xkb_supported = false; } /* end of ugliness */ - if (!XkbSelectEvents(xkbdpy, XkbUseCoreKbd, - XkbMapNotifyMask | XkbStateNotifyMask, - XkbMapNotifyMask | XkbStateNotifyMask)) { + if (xkb_supported && !XkbSelectEvents(xkbdpy, XkbUseCoreKbd, + XkbMapNotifyMask | XkbStateNotifyMask, + XkbMapNotifyMask | XkbStateNotifyMask)) { fprintf(stderr, "Could not set XKB event mask\n"); return 1; } -- 2.39.5