Commit graph

1650 commits

Author SHA1 Message Date
Benno Schulenberg
03ba014094 nls: use a slash instead of a combining solidus in compose sequences
First: combining diacritics like the combining long solidus (`U+0338`)
are not meant to be used in compose sequences.  Second: there is just
one layout in xkeyboard-config that contains the `U0338` character:
the deprecated/obsolete German T3 layout.  So, practically speaking,
these compose sequences with `U0338` were untypable.  So, use a slash
instead, that almost all layouts have.  This does require that the
sequence `<Compose> <less> <slash>` changes its meaning from backslash
to not-less-than (`≮`).  This seems like an acceptable sacrifice, as
the sequence `<Compose> <slash> <slash>` is a faster/easier sequence
for the backslash and most layouts contain a backslash already anyway.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2023-05-23 22:18:07 +00:00
Benno Schulenberg
616701317e nls: delete six compose sequences that cannot be typed
None of the layouts in xkeyboard-config contain `Ohook` or `Uhook`
or `U+01D3` (U with caron) nor their lowercase forms, so these six
sequences cannot be typed on any known keyboard.

(Also, the target characters of the sequences with hook and horn
seem to occur only in Vietnamese, where the horn is part of the
vowel and the hook is a tonal mark.  All Vietnamese layouts in
xkeyboard-config contain `Ohorn` and `Uhorn`, and then the five
tonal marks as dead keys, `dead_hook` among them.  It does not
make sense to want to apply a horn to a vowel that already has
a tonal mark, nor is it possible with the Vietnamese layouts.)

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2023-05-22 11:35:57 +02:00
Benno Schulenberg
35d9621d78 nls: sort three sequences alphabetically in their group, like all others
Also, consistently form uppercase+lowercase pairs, like for most others.
2023-05-21 16:40:49 +02:00
Benno Schulenberg
208d550954 nls: make the Amharic compose sequences use the dead-vowel symbols
Last year, commit 488b156fe2 changed mistaken ASCII characters to the
code points that were actually used in the Ethiopian keyboard layout.

But those code points were mistaken too: the intention was not to use
the code point U+FE68 in the layout but the raw symbol code 0xfe68 --
and so on for the other codes.  The symbols that these raw codes were
intended to refer to were `dead_a` and friends.  But these dead vowels
were added under different codes: 0xfe80 to 0xfe8b.

So, correct the Amharic compose sequences to make use of the dead-vowel
symbols that were specifically added for them fifteen years ago.

(As soon as this is merged, xkeyboard-config wil be changed too to use
the dead vowels in the Ethiopian layout.)

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2023-04-16 17:48:54 +02:00
jmcwilliams403
96cbac89a0 nls: add compose sequence for capital schwa, and delete a deviant one
This sequence has already been defined in the iso8859-9e compose
file meant for the Azerbaijani locale, yet for the longest time, only
the lowercase form has existed in the en_US.UTF-8 master compose
file. This patch adds one sequence for Latin Capital Letter Schwa for
the Azerbaijani language.

Additionally, the sequence in the pt_BR.UTF-8 locale for capital
schwa has been removed as it uses two lowercase e's as part of its
sequence, which in practice would make typing both `Multi_key e e`
and `Multi_key E E` output capital schwa.
2023-04-06 14:30:17 +00:00
Benno Schulenberg
a6528d92b3 XSetScreenSaver.man: restore the part that was accidentally snipped
Four years ago, while removing private macros, commit fe46eb2871
unintentionally truncated the XSetScreenSaver manpage.  Restore
the snipped part (minus trailing spaces and a mistaken singular).

This fixes issue #187.

Reported-by: Sergio Gelato

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2023-04-04 14:15:05 +02:00
jmcwilliams403
eb166af8f9 NLS: Remove strange dead_cedilla cedi sign sequences
These sequences appear to be a leftover artifact of auto-generating
dead_currency sequences for cent and the cedi sign, where chaining
with ascii "c" vs "ccedilla" would output cent vs the cedi sign
respectively, but somehow this ended up creating strange sequences
with dead_cedilla followed by cent or the colon sign to output the
cedi sign, the latter sequence of which was already removed recently.
Additionally, sequences beginninng with dead_cedilla followed by
currency have been removed as they also appear to be related to these
artifacts. The two remaining sequences beginning with dead_currency
followed by dead_cedilla are maintained and moved to the stretch of
dead_currency sequences next to ccedilla, and sorted in order of
unicode decompositional complexity.
2023-03-29 16:14:07 +00:00
Benno Schulenberg
6e889f3467 nls: remove twenty two untypable Greek compose sequences
None of the keyboard layouts in xkeyboard-config contains accented
Greek characters like `Greek_alphaaccent` or `Greek_iotadieresis`
(nor in their Unicode hexadecimal forms, like U03AC or 0x10003CA),
so none of these sequences could be typed on an existing layout.

Also, the two sequences that started with `Greek_accentdieresis`
were plain wrong: making a spacing character into a dead key.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2023-03-24 09:50:24 +01:00
Benno Schulenberg
98be4cb23a nls: remove four hundred and sixty untypable Greek compose sequences
None of the keyboard layouts in xkeyboard-config contains code points
in the range U+1F00..U+1FFF (the Greek Extended block), so none of the
removed sequences could be typed on an existing layout.

(Of course it is possible that some people have their own private layout
that contains some of the Greek Extended characters, but if they do,
then they can also define private compose sequences, when needed.)

Modern Greek does not use these characters with polytonic diacritics
anyway -- they are useful only for typing traditional Greek.

The useless sequences were removed with this command:

  sed -i '/<U1F..>/d' nls/en_US.UTF-8/Compose.pre

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2023-03-24 09:14:13 +01:00
Benno Schulenberg
ff8706a5ea nls: delete compose sequences that pointlessly mix upper and lower case
It's nice to have compose sequences for things like © and ®, but allowing
them to be composed also with letters of different case is unneeded.  It
is good enough to have sequences of only lowercase and only uppercase.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2023-03-21 10:39:00 +01:00
jmcwilliams403
ca99e338a9 NLS: move dead-caron subscript compositions to the relevant Unicode block 2023-03-19 11:48:35 +01:00
jmcwilliams403
dac2985b34 NLS: implement the expansion of the six Breton N-graph keysyms
These one-keysym-to-multiple-characters sequences will allow fully defining
the Breton keyboard layout, without needing custom compose sequences.
2023-03-16 16:27:21 +01:00
Alan Coopersmith
e45ca7b41d gitlab CI: add workflow rules
Needed due to the gitlab config changes described in:
 https://gitlab.freedesktop.org/freedesktop/freedesktop/-/issues/438

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-03-14 17:25:40 +00:00
jmcwilliams403
72eeeb6ded NLS: move long S compositions to respective blocks 2023-03-05 13:37:28 +00:00
Alan Coopersmith
8bbbed75a2 configure: Use LT_INIT from libtool 2 instead of deprecated AC_PROG_LIBTOOL
AC_PROG_LIBTOOL was replaced by LT_INIT in libtool 2 in 2008,
so it's time to rely on it.

Clears autoconf warnings:

configure.ac:20: warning: The macro `AC_PROG_LIBTOOL' is obsolete.
configure.ac:20: You should run autoupdate.
m4/libtool.m4💯 AC_PROG_LIBTOOL is expanded from...
configure.ac:20: the top level

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-03-04 13:13:29 -08:00
Alan Coopersmith
53bf8584e8 configure: replace deprecated AC_HELP_STRING with AS_HELP_STRING
This silences an autoconf warning.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-02-06 14:11:09 -08:00
Alan Coopersmith
31a9451111 configure: raise minimum autoconf requirement to 2.70
Needed for builds on NetBSD to work correctly, since it depends on
AC_USE_SYSTEM_EXTENSIONS defining _OPENBSD_SOURCE to expose the
prototype for reallocarray() in the system headers.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-02-06 13:32:14 -08:00
Alan Coopersmith
1ba02f878f gitlab CI: Add libtool to required packages
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-02-06 13:32:14 -08:00
Alan Coopersmith
fc5ec8edda
libX11 1.8.4
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-02-04 12:02:29 -08:00
Alan Coopersmith
ba548ed168 configure: options summary should say "libX11", not just "X11"
We're not configuring the entire window system here, just one library

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-01-15 11:39:20 -08:00
GaryOderNichts
eb1c272ab5 Fix a9e845 and 797755 Allow X*IfEvent() to reenter libX11 2023-01-14 16:59:54 +00:00
Benno Schulenberg
0c7c4ce875 nls: add two compose sequences for capital B with stroke, for consistency
Two compose sequences (with plain ASCII characters) existed for
the lowercase b with stroke (ƀ) but not for the capital one (Ƀ).

This addresses part of issue #166.

Reported-by: J. McWilliams

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2023-01-07 17:12:22 +00:00
Benno Schulenberg
a80ef097e7 nls: delete twelve compose sequences that cannot be typed
There is not any keyboard layout (in xkeyboard-config) that contains
`obelowdot` or `ubelowdot`, so having compose sequences that use these
symbols is pointless.

There are some layouts that contain `otilde` (and one that contains
`utilde`), but those layouts then do not contain `dead_horn`, so
the compose sequences that combine the two symbols are pointless.

There are a few layouts that contain U+0256, U+025C, U+025F or U+0279,
but those layouts do not contain `dead_hook`, so the compose sequences
that combine the latter with one of the former are pointless.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2023-01-07 17:12:22 +00:00
Benno Schulenberg
078cc39f05 nls: delete 88 compose sequences that have the accents in the wrong order
The various compose sequences with the accents in their proper order
(the highest placed accent first) continue to exist.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2023-01-07 17:12:22 +00:00
Benno Schulenberg
aa5ef0ba80 nls: move the compose sequences for Ș and Ț to the fitting Unicode block
This addresses a side note of issue #166.

Reported-by: J. McWilliams

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2023-01-07 17:12:22 +00:00
Alan Coopersmith
82c25879b7 xlibi18n: Update Imake instructions to autoconf equivalent in comments
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-01-07 16:59:47 +00:00
Yuxuan Shui
88399e01be Revert "Update XPutBackEvent() to support clients that put back unpadded events"
This reverts commit d6d6cba902.

The reverted commit intended to fix the problem where an unpadded X
event struct is passed into XPutBackEvent, by creating a padded struct
with _XEventToWire and _XWireToEvent. However, _XWireToEvent updates the
last sequence number in Display, which may cause xlib to complain about
lost sequence numbers.

IMO, the problem that commit tried to solve is a bug in the client
library, and workaround it inside Xlib is bad practice, especially given
the problem it caused. Plus, the offender cited in the original commit
message, freeglut, has already fixed this problem.

Fixes: #176 #174

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2023-01-03 15:23:07 +00:00
Alan Coopersmith
48487c4b90
libX11 1.8.3
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-12-15 14:56:28 -08:00
Keith Packard
d6d6cba902
Update XPutBackEvent() to support clients that put back unpadded events
It seems to be common practice of some X11 clients to pass specific event
types into APIs that take XEvent*.  For example, freeglut does:

   XConfigureEvent fakeEvent = {0};
   ...
   XPutBackEvent(fgDisplay.Display, (XEvent*)&fakeEvent);

This can result in reads overflowing the input event when libX11 does:

   XEvent store = *event;

=================================================================
==75304==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x00016ee4a8e8 at pc 0x000101c54d14 bp 0x00016ee4a0d0 sp 0x00016ee49888
READ of size 192 at 0x00016ee4a8e8 thread T0
    #0 0x101c54d10 in __asan_memcpy+0x1a4 (libclang_rt.asan_osx_dynamic.dylib:arm64e+0x3cd10)
    #1 0x102848a18 in _XPutBackEvent PutBEvent.c:41
    #2 0x1028490a4 in XPutBackEvent PutBEvent.c:84
    #3 0x1013295c8 in fgOpenWindow freeglut_window.c:1178
    #4 0x101321984 in fgCreateWindow freeglut_structure.c:108
    #5 0x10132b138 in glutCreateWindow freeglut_window.c:1551
    #6 0x100fb7d94 in main+0x78 (checkeredTriangles:arm64+0x100003d94)
    #7 0x197de3e4c  (<unknown module>)

Address 0x00016ee4a8e8 is located in stack of thread T0 at offset 840 in frame
    #0 0x1013282f8 in fgOpenWindow freeglut_window.c:1063

  This frame has 8 object(s):
    [32, 40) 'title.addr'
    [64, 176) 'winAttr' (line 1066)
    [208, 240) 'textProperty' (line 1067)
    [272, 352) 'sizeHints' (line 1068)
    [384, 440) 'wmHints' (line 1069)
    [480, 672) 'eventReturnBuffer' (line 1070)
    [736, 740) 'num_FBConfigs' (line 1072)
    [752, 840) 'fakeEvent' (line 1074) <== Memory access at offset 840 overflows this variable

This change allows XPutBackEvent() to support such clients without
risk of memory read overflow.

Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Tested-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2022-12-11 11:17:48 -08:00
Jeremy Huddleston Sequoia
496d9bfeed
ximcp: Address warning found by UBSan when growing an empty tree
imLcPrs.c:681:52: runtime error: applying zero offset to null pointer

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2022-12-10 23:15:47 -08:00
Takao Fujiwara
7f7bcd7b6f nls: consecutive cs number in en_US.UTF-8/XLC_LOCALE 2022-12-06 16:59:56 +00:00
Ulrich Sibiller
ba09596734 ChkIfEv.c: fix wrong handling of dpy->in_ifevent
Is no longer a bool but a counter.

Signed-off-by: Ulrich Sibiller <uli42@gmx.de>
2022-12-01 14:54:12 -08:00
Ulrich Sibiller
70eaf1174e Indentation fixes around recent dpy->in_ifevent changes
Use the same indentation as the surrounding code.

Signed-off-by: Ulrich Sibiller <uli42@gmx.de>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-12-01 14:53:06 -08:00
Matthieu Herrb
a9e845809b Fix 797755 Allow X*IfEvent() to reenter libX11
- the activation logic is reversed
- there is also _XInternalLockDisplay() that needs protection
- I've found cases (in fvwm2) where the callback calls XCheckIfEvent()
  recursively. So the flag needs to be a counter.

Reviewed-by: Adam Jackson <ajax@redhat.com>
2022-11-19 09:20:00 -08:00
Nia Alarie
bccd787a56 Don't use pragma inside a function, it breaks compiling with older GCCs.
XKBBind.c:230: error: #pragma GCC diagnostic not allowed inside functions

Signed-off-by: Thomas Klausner <wiz@gatalith.at>
2022-11-11 17:05:30 +00:00
Oliver
696d19d5db Add XFreeThreads function. 2022-11-11 17:04:00 +00:00
Alan Coopersmith
b4f24b272c
libX11 1.8.2
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-11-10 12:18:17 -08:00
Alan Coopersmith
77629ea5e7 README.md: Add 1.8.2 changes
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-11-07 20:11:28 +00:00
Alan Coopersmith
d1baf2ec48 Remove NEWS file which only covered 2006 & 2007 releases
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-11-07 20:11:28 +00:00
Po Lu
1294bfa487 specs: document change in XIMPreeditCallbacks
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-11-03 14:47:19 -07:00
Alan Coopersmith
1a7e54609c man pages: document XCloseIM frees its argument
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-11-03 14:44:22 -07:00
Alan Coopersmith
a04b84f0f7 Copyright & license cleanup 2022-11-03 20:31:31 +00:00
Benno Schulenberg
5e41119d96 nls: reshuffle a few compose sequences, to have similar ones together
It makes more sense to have similar sequences grouped together
than to rigidly follow the order of ascending Unicode codes.
2022-11-02 18:26:56 +00:00
Benno Schulenberg
65d89342f5 nls: remove two compose sequences that use deprecated symbols
The last few occurrences of `leftcaret` and `rightcaret` were replaced
with `less` and `greater` in xkeyboard-config half a year ago.
2022-11-02 18:26:56 +00:00
Benno Schulenberg
6baccbae53 nls: let <Multi_key> <minus> <underscore> compose U+2212 (MINUS SIGN)
There was not yet any way to compose the Unicode minus sign, U+2212.
2022-11-02 18:26:56 +00:00
Adam Jackson
7977557541 Allow X*IfEvent() to reenter libX11
The documentation for this family of functions very clearly says not to
call into xlib in your predicate function, but historically single
threaded apps could get away with it just fine, and now that we've
forced thread-safety on the world such apps will now deadlock instead.
That's not an acceptable regression even if the app is technically
broken. This has been reported with XFCE and FVWM, and Motif's
cut-and-paste code has the same bug by inspection, so this does need to
be addressed.

This change nerfs LockDisplay/UnlockDisplay while inside the critical
bit of an IfEvent function. This is still safe in the sense that the
display remains locked and no other thread should be able to change it
from under us, but the loop that scans the event queue might not be
robust against it being modified as a side effect of protocol emitted by
the predicate callback. But that's not new, non-XInitThreads'd xlib
would have the same caveat.

Closes: xorg/lib/libx11#157
2022-11-02 14:05:38 +00:00
Benno Schulenberg
0d1d65bdd9 nls: change <Compose> <^> <-> to mean superscript minus instead of macron
Several other `<Multi_key> <asciicircum> <symbol>` sequences
produce the superscript equivalent of the given symbol.  So,
let `<Multi_key> <asciicircum> <minus>` do the same.

Also, add two other sequences for producing a plain macron,
to compensate a bit the loss of the above sequence.

Additionally, make `<Multi_key> <underscore> <minus>` produce
a subscript minus, for consistency.

This fixes issue #165.

Requested-by: J. McWilliams

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-10-31 16:29:47 +01:00
Jan Tojnar
3108982707 nls: Map sr locales to sr_RS compose files
Serbian used sr_YU (Yugoslavia) code in the past.
Then it was succeeded by sr_CS (Serbia and Montenegro).
Finally, it was split into sr_RS (Serbia) and sr_ME (Montenegro).

da95ecbbdc
introduced the modern sr_RS and sr_ME codes.

Next, 4076189869
added the Serbian compose table but only for the legacy sr_CS entry.

5cd60398b7
removed the legacy sr_CS entry, the only one pointing to the correct compose file.
It also renamed the file to sr_RS, but did not update the compose mapping.

Let’s point all Serbian locales to the Compose file again.
2022-10-20 09:14:49 +02:00
Alan Coopersmith
a35d706cd8 COPYING: remove notice for the removed UIThrStubs.c
Fixes: 701e9e9a ("Use same pthread-stubs as libxcb")

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-10-14 20:55:27 +00:00
Benno Schulenberg
3b1750e982 nls: delete two compose sequences with an anomalous post-fixed breve
Two years ago, commit b126bfd7fe allowed using also a lowercase `u`
wherever an uppercase `U` was used to represent a breve.  But the
commit should have limited itself to only the prefixed uses of `U`,
as that is how most letters with a breve are composed.

Also, group the two compose sequences with an uppercase post-fixed `U`
together with the corresponding other post-fixed sequences.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-10-14 20:46:19 +00:00