diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2022-02-21 08:01:25 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2022-02-21 08:01:25 +0000 |
commit | 3d9d1e605f01f25d680f28a03713ab031dc7c46e (patch) | |
tree | 3799a3516aefe2074c84243c932f20a5faea8e8d /lib/libX11/src | |
parent | c259179a37a495b4e22c6787185a50171358d838 (diff) |
Update to libX11 1.7.3.1. ok jsg@ who noticed this requires a major bump.
Diffstat (limited to 'lib/libX11/src')
-rw-r--r-- | lib/libX11/src/util/makekeys.c | 12 | ||||
-rw-r--r-- | lib/libX11/src/xcb_io.c | 20 | ||||
-rw-r--r-- | lib/libX11/src/xlibi18n/lcDB.c | 8 | ||||
-rw-r--r-- | lib/libX11/src/xlibi18n/lcUTF8.c | 1 |
4 files changed, 26 insertions, 15 deletions
diff --git a/lib/libX11/src/util/makekeys.c b/lib/libX11/src/util/makekeys.c index e847ef4c6..4896cc539 100644 --- a/lib/libX11/src/util/makekeys.c +++ b/lib/libX11/src/util/makekeys.c @@ -78,6 +78,18 @@ parse_line(const char *buf, char *key, KeySym *val, char *prefix) return 1; } + /* See if we can parse one of the _EVDEVK symbols */ + i = sscanf(buf, "#define %127s _EVDEVK(0x%lx)", key, val); + if (i == 2 && (tmp = strstr(key, "XK_"))) { + memcpy(prefix, key, (size_t)(tmp - key)); + prefix[tmp - key] = '\0'; + tmp += 3; + memmove(key, tmp, strlen(tmp) + 1); + + *val += 0x10081000; + return 1; + } + /* Now try to catch alias (XK_foo XK_bar) definitions, and resolve them * immediately: if the target is in the form XF86XK_foo, we need to * canonicalise this to XF86foo before we do the lookup. */ diff --git a/lib/libX11/src/xcb_io.c b/lib/libX11/src/xcb_io.c index 4be75408a..dff441ff5 100644 --- a/lib/libX11/src/xcb_io.c +++ b/lib/libX11/src/xcb_io.c @@ -704,18 +704,14 @@ Status _XReply(Display *dpy, xReply *rep, int extra, Bool discard) if(dpy->xcb->event_owner == XlibOwnsEventQueue) { xcb_generic_reply_t *event; - /* If some thread is already waiting for events, - * it will get the first one. That thread must - * process that event before we can continue. */ - /* FIXME: That event might be after this reply, - * and might never even come--or there might be - * multiple threads trying to get events. */ - while(dpy->xcb->event_waiter) - { /* need braces around ConditionWait */ - ConditionWait(dpy, dpy->xcb->event_notify); - } - while((event = poll_for_event(dpy, True))) - handle_response(dpy, event, True); + + /* Assume event queue is empty if another thread is blocking + * waiting for event. */ + if(!dpy->xcb->event_waiter) + { + while((event = poll_for_response(dpy))) + handle_response(dpy, event, True); + } } req->reply_waiter = 0; diff --git a/lib/libX11/src/xlibi18n/lcDB.c b/lib/libX11/src/xlibi18n/lcDB.c index 48a10791b..8b02b67ef 100644 --- a/lib/libX11/src/xlibi18n/lcDB.c +++ b/lib/libX11/src/xlibi18n/lcDB.c @@ -517,11 +517,13 @@ append_value_list (void) } if (value != *value_list) { int i; - ssize_t delta; - delta = value - *value_list; + char *old_list; + old_list = *value_list; *value_list = value; + /* Re-derive pointers from the new realloc() result to avoid undefined + behaviour (and crashes on architectures with pointer bounds). */ for (i = 1; i < value_num; ++i) { - value_list[i] += delta; + value_list[i] = value + (value_list[i] - old_list); } } diff --git a/lib/libX11/src/xlibi18n/lcUTF8.c b/lib/libX11/src/xlibi18n/lcUTF8.c index 57c8696e4..b18f77e19 100644 --- a/lib/libX11/src/xlibi18n/lcUTF8.c +++ b/lib/libX11/src/xlibi18n/lcUTF8.c @@ -2358,6 +2358,7 @@ _XlcAddUtf8LocaleConverters( /* Register converters for XlcNFontCharSet */ _XlcSetConverter(lcd, XlcNMultiByte, lcd, XlcNFontCharSet, open_utf8tofcs); _XlcSetConverter(lcd, XlcNWideChar, lcd, XlcNFontCharSet, open_wcstofcs); + _XlcSetConverter(lcd, XlcNUtf8String, lcd, XlcNFontCharSet, open_utf8tofcs); } void |