Commit graph

1586 commits

Author SHA1 Message Date
Benno Schulenberg
35ad99fad2 nls: add four sequences for the Samogitian E with dot above and macron
These sequences each produce two code points: the E-with-dot-above and
a combining macron.  The XIM input method is required for this to work.

(Also add a missing comment for a Unicode block.)

This fixes issue #54.

Requested-by: Arns Udovīčė

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-07-15 17:58:35 +00:00
Benno Schulenberg
2732dd20cc nls: delete eight sequences that pointlessly mix upper and lower case
Typing a compose sequence requires some care -- surely the user is able
to either keep holding the Shift key or not touch it at all while typing
the sequence.  Also, compose sequences are not an infinite resource AND
take up space and time -- defining redundant ones is a waste.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-07-15 10:03:00 +02:00
Benno Schulenberg
ea3cc474e1 nls: add compose sequences for the double-struck capitals ℕ ℤ ℚ ℝ ℂ
This allows the user to type the symbols for the five number systems.

This fixes the reasonable part of issue #159.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-07-15 10:03:00 +02:00
Benno Schulenberg
95a03cde43 nls: delete some pointless and wrong compose sequences meant for Bépo
Fourteen years ago, commit 7302984642 added some four hundred compose
sequences for the benefit of the French Bépo layout.  But among these
four hundred there are several that use symbols that are not available
in the Bépo layout and are thus impossible to type.  Some of the used
symbols, like Ahook, Ehook and Ohook, are not even present in *any*
layout, making these sequences a dead weight in the Compose file.

The Amacron and Omacron are available only in the Latvian, Hawaiian,
and Maori layouts, and the Omacron also in the Silesian layout.  But
the Latvian layouts and the Hawaiian do not contain any dead keys.
Only in the Maori and Silesian layouts these sequences with Amacron
and Omacron could be typed, but that was not why they were added.

More importantly, as James Cloos noted in issue #54, sequences like
`<dead_abovedot> <amacron>` for generating `ǡ` (that is: the macron
above the dot) are questionable, as in compose sequences generally
the first accent typed is the uppermost in the composed character.

Reference:
  https://gitlab.freedesktop.org/xorg/lib/libx11/-/issues/54#note_17321

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-07-14 12:31:52 +02:00
Matthieu Herrb
9702b83686 Mention that the predicate function is called with the display lock
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
2022-07-01 11:13:13 +02:00
Benno Schulenberg
a5d00f889f docs: replace three placeholders with something that makes sense
Also, uncapitalize two arguments, to match the style of all others.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-06-24 16:23:14 +02:00
Benno Schulenberg
9ff8502040 docs: remove the unsightly dashes from the overviews of arguments
Seventeen months ago, commits 78027fdb7a and 4f15cfc645 removed
these dashes from two of the man pages.  Now, remove them all.
They are unhelpful and just make one wonder why they are there
(probably to function as improvised bullet points).

Also remove four leading spaces and a trailing comma.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-06-24 16:11:53 +02:00
Benno Schulenberg
a7968c47e3 docs: hard-wrap some items so that Table 2 fits within 80 characters
(Table 1 hard-wraps the first-column items in the same way.)

Also, correct the formatting of the subsequent paragraph.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-06-23 16:11:23 +02:00
Benno Schulenberg
c601c779ca nls: delete compose sequences that mix top-row digits with numpad digits
Compose sequences for circled numbers, like ⑫  or ㉑, are nice to have,
but allowing them to be composed by typing one digit on the top row and
the other on the numerical keypad (or the other way around) is over the
top.  Remove these absurd sequences.  Keep only the sequences where both
digits are either on the top row or on the numerical keypad.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-06-15 11:02:08 +02:00
Alan Coopersmith
3a30ada60c
libX11 1.8.1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-06-08 17:41:46 -07:00
Alan Coopersmith
70f7403fd3 configure.ac: Fix --enable-thread-safety-constructor
Prior to this, --enable-thread-safety-constructor would disable it,
while --disable worked as expected, and no option left it enabled as
expected by default.  This also fixes the --help text to be displayed.

Fixes: afcdb6fb00
Reported-by: @igor.v.kovalenko
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2022-05-04 09:23:18 -07:00
Adam Jackson
d0da5a1e0f libX11 1.8
Minor number bump to reflect the thread safety default change.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2022-04-29 11:27:44 -04:00
Adam Jackson
afcdb6fb00 global: call XInitThreads() from the library's constructor
There is really no point in not being thread safe, I measured, all you
can see happen is noop performance gets like twice as slow and you have
thread safety bugs. And we're using xcb as the transport which means we
should expect threads in our clients anyway. Just do it.

This assumes your compiler understands __attribute__((constructor)). If
this is not your compiler, you can disable this with the appropriate
configure flag, but be aware you're asking for bugs.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2022-04-26 15:08:31 -04:00
Benno Schulenberg
1ab48f3cc9 docs: add release notes for versions 1.7.3, 1.7.4, and 1.7.5
They were forgotten when those releases were made.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-04-24 15:15:05 +02:00
Alan Coopersmith
35d1513bc7 XkbOpenDisplay: Add _Xconst qualifier to display name argument
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-04-23 16:38:49 +00:00
Alan Coopersmith
c88ceaad4a XKBgeom.h: Add _Xconst qualifier to char * arguments in functions
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-04-23 16:38:49 +00:00
Alan Coopersmith
0ce4425826 XKBgeom.h: Remove XKB_IN_SERVER section
The Xserver made its own copy of this file in 2008, and the API's are
no longer the same between the server and client forks.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-04-23 16:38:49 +00:00
Benno Schulenberg
be8c01946a lcCT: use the correct index for checking the second byte
(Not that it will make any difference, as the checking of these
high bits looks like an excess of precaution.)

This fixes issue #134.

Reported-by: Rafał Mikrut

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-04-20 10:23:51 +02:00
Benno Schulenberg
488b156fe2 nls: make the Ethiopian compose sequences actually work
In the Ethiopian keyboard layout, the dead vowel keys do not produce <e>
and <u> and so on, but instead produce <U+FE69> and <U+FE75> and so on,
so the compose sequences should use those latter code points.

Also, include the basic compose sequences from en_US.UTF-8/Compose,
so that, when switching to a different layout in the Ethiopian locale,
all the usual compose sequences work too.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-04-20 06:58:52 +00:00
Benno Schulenberg
e6f98a3dbd nls: add Multi-key sequences for abovedot, diaeresis, and ogonek
These accents by themselves could only be produced when one had a
dead key for them, not with the help of the Multi key.

[Note that the sequences <dead_acute> <space> for apostrophe (')
and <dead_diaeresis> <space> for double quote (") are anomalies,
as normally <dead_accent> <space> produces the accent itself.]

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-04-18 17:27:41 +02:00
Benno Schulenberg
d323704e7c nls: remove eight pointless self-producing compose sequences
Compose sequences are meant to produce certain symbols by combining
certain different symbols, not to produce a symbol with the help of
the symbol itself.

This fixes issue #59.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-04-18 17:23:05 +02:00
Benno Schulenberg
3b62c0322c nls: remove misplaced sequences from Ethiopian and Greek compose files
The Khmer digraphs and Arabic ligatures have nothing to do with
Amharic or Greek.

(Also rewrap a comment and correct two others.)

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-04-15 13:28:01 +00:00
Benno Schulenberg
479af78f2e nls: remove redundant Khmer digraphs, already defined in included file
This fixes issue #160.

Reported-by: Mike Fabian

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-04-15 13:28:01 +00:00
Alan Coopersmith
6d7d08726f XkbUpdateKeyTypeVirtualMods: always initialize mask
XkbVirtualModsToReal should only fail to set mask if the server does
not support XKB, but it still made Oracle Parfait complain:

Error: Uninitialised memory
   Uninitialised memory variable [uninitialised-mem-var] (CWE 457):
      Possible access to uninitialised memory referenced by variable 'mask'
        at line 863 of lib/libX11/src/xkb/XKBMisc.c in function 'XkbUpdateKeyTypeVirtualMods'.
        Path in callee avoiding write at line 862
          mask allocated at line 860

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-04-10 14:51:55 -07:00
Matt Turner
9ac6859c20 libX11 1.7.5
Signed-off-by: Matt Turner <mattst88@gmail.com>
2022-04-03 10:15:30 -07:00
Simon McVittie
76d1cc3c1c Don't try to destroy NULL condition variables
This avoids a segfault during error-unwinding if an invalid display name
is passed to XOpenDisplay().

Fixes: 8a368d80 "Fix two memory leaks in _XFreeX11XCBStructure()"
Resolves: #155
Signed-off-by: Simon McVittie <smcv@debian.org>
2022-04-03 14:24:13 +01:00
Matt Turner
80b30d1251 libX11 1.7.4
Signed-off-by: Matt Turner <mattst88@gmail.com>
2022-03-30 13:54:13 -07:00
Hodong
8a368d808f Fix two memory leaks in _XFreeX11XCBStructure()
Even when XCloseDisplay() was called, some memory was leaked.

XCloseDisplay() calls _XFreeDisplayStructure(), which calls
_XFreeX11XCBStructure().

However, _XFreeX11XCBStructure() did not destroy the condition variables,
resulting in the leaking of some 40 bytes.

Signed-off-by: Hodong <hodong@yozmos.com>
2022-03-24 16:50:11 +00:00
Adam Jackson
da97120f23 xcb: Clarify the XInitThreads error message
XInitThreads has been called if _Xglobal_lock != NULL, we may as well
check that before printing a misleading error message.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2022-03-23 13:31:05 -04:00
Giovanni Mascellani
257927c51b xcb_io: Allow jumps backwards when widening the request number.
Request numbers are not always seen in the numeric order by widen(),
for example due to Mesa directly calling _XError(). When this happens,
widen() adds 2^32 to the reported widened number, triggering failed
assertions and bad behavior.

With this commit, wrapping of the lower dword is detected in a more
robust way, by requiring that a skip of at least 2^31 is seen.

This fixes issue #152.

Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
2022-03-23 16:22:25 +00:00
Benno Schulenberg
918063298c nls: add a compose sequence for the peace symbol
As the thing in the circle looks a bit like an upside-down Y,
use <O> <Y> as the sequence, similar to <O> <A> for anarchism.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-03-03 12:06:35 +01:00
Benno Schulenberg
4f9eb32709 nls: remove obsolete locale aliases with uppercase in the language code
(These aliases may have been useful on some systems twenty years ago,
but nowadays all should have settled on lowercase language code plus
uppercase country code.)

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-02-25 17:53:23 +00:00
Benno Schulenberg
ba0d3b437d nls: map eo.UTF-8 directly to en_US.UTF-8 instead of using a relay alias
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-02-25 12:53:10 +01:00
Benno Schulenberg
cfddb79981 nls: remove the mistaken eo_EO names -- EO is not a valid country code
(Debian has had several of these lines commented out for years.)

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-02-25 12:52:45 +01:00
iyzana
eb5885245a nls: add locale alias from eo.UTF-8 to eo_XX.UTF-8
There is no matching locale in the locale.dir and compose.dir files for
the locale eo.UTF-8. Setting it as the locale resulted in compose files
not being loaded.

Signed-off-by: iyzana <iyzana@protonmail.com>
2022-02-25 10:45:07 +00:00
Benno Schulenberg
24df23dff9 nls: group the compose sequences for tilde, degree, and cedilla together
Also, correct the comment for the double quote character ("), and move
the soft hyphen and the interrobangs to a special punctuation group.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-02-24 18:24:12 +00:00
Benno Schulenberg
c0191f020f nls: use shape-based compose sequences for hammer-and-sickle instead
Using a misspelled abbreviation (CCCP) of an obsolete country's name
to compose a fairly general communist symbol does not seem right.

    https://en.wikipedia.org/wiki/Hammer_and_sickle

Many compose sequences instead combine characters that together look
similar to the target character.  Do the same here: question mark (?)
plus backslash (\) look a bit like ☭ .

In the bargain, this fixes issue #63.

Reported-by: Marc Mezzarobba

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-02-24 18:24:12 +00:00
Alan Coopersmith
582dc6f89e gitlab CI: enable Static Application Security Testing (SAST)
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-02-20 11:52:22 -08:00
Benno Schulenberg
336e8f7255 nls: add compose sequences for leftward, upward and downward double arrow
These sequences follow the logic of: the arrow shaft (=) first, the
arrow head (< or > or ^ or v) second.  This is so because the sequence
<= is already taken for ≤, and there is no obvious ASCII character for
a double vertical line, so we have to make do with a horizontal one.

Since commit 6101b967b6 from eight years ago, there is a compose sequence
for the rightward double arrow, but not for the other three directions.

This fixes issue #138.

Requested-by: Mélanie Chauvel

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-02-20 15:20:52 +01:00
Benno Schulenberg
623b77d4f3 imDefLkup: verify that a pointer isn't NULL before using it
It is possible for _XimICOfXICID() to return NULL, so it is necessary
to check this isn't actually the case before dereferencing the pointer.
All other callers of _XimICOfXICID() do this check too.

(The check itself is ugly, but it follows the style of the code in the
rest of the module.)

Fixes issue #45.

Reported-by: Bhavi Dhingra

Original-patch-by: Bhavi Dhingra

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-02-14 11:47:46 +01:00
Christopher Chavez
b83938f7f9 Xlib.h: fix spelling in comment
Signed-off-by: Christopher Chavez <chrischavez@gmx.us>
2022-02-14 00:23:09 -06:00
Christopher Chavez
4791055682 Xlib.h: spelling fix in comment 2022-02-13 05:26:14 +00:00
Denis Drakhnia
9304e645bd nls: Add ru_UA.utf8 locale alias.
Signed-off-by: Denis Drakhnia <numas13@gmail.com>
2022-02-04 16:24:02 +00:00
Benno Schulenberg
9ef2551f0c nls: do some manual adjustment of whitespace in the compose sequences
This achieves a more consistent vertical alignment (per group) of the
target character and the trailing comments.

(Most blocks were aligned in some fashion, except the "Greek Extended"
block, which has lines of greatly varying lengths.)

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-02-03 16:19:39 +01:00
Benno Schulenberg
0dad289ead nls: among the compose sequences, replace all runs of spaces with tabs
It was done with this script:

    cat nls/en_US.UTF-8/Compose.pre |
    sed 's!\(^<.\{6,13\}>\)\s*:!\1\t\t\t\t:!' |
    sed 's!\(^<.\{14,21\}>\)\s*:!\1\t\t\t:!' |
    sed 's!\(^<.\{22,29\}>\)\s*:!\1\t\t:!' |
    sed 's!\(^<.\{30,37\}>\)\s*:!\1\t:!' |
    sed 's!\(: ".*"\)\s*!\1\t!' |
    sed 's!\(\s*# \)! # !' > trimmed &&
    mv  trimmed  nls/en_US.UTF-8/Compose.pre

This saves 37 kilobytes of whitespace.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-02-02 14:12:06 +01:00
Benno Schulenberg
fc79e39c23 docs: add missing word, wrap line, fix typo, and trim an excess space
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-02-02 14:11:53 +01:00
Benno Schulenberg
93446455c4 KeyBind: reshuffle two ifs into the general order of ascending codes
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-01-27 15:02:09 +01:00
Benno Schulenberg
93f15f5f29 KeyBind: slightly speed up some case conversions by adding missing returns
This avoids pointlessly tumbling through several more ifs when the
conversion has aleady been done.

Also remove two redundant conditions (as lower codes have already
been handled) and fold two other conditions together.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-01-27 14:38:33 +01:00
Benno Schulenberg
317c7abbcc KeyBind: update the Greek case-conversion tables to Unicode Data 14.0
A few symbols, like Heta and Sampi and dotted lunate Sigma, have been
assigned code points since Unicode Data 4.0, and need their entries.

This fixes issue #132.

Reported-by: Ray Vine

Original-patch-by: Ray Vine

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-01-27 14:04:11 +01:00
Benno Schulenberg
402b843fa7 remove a commented-out code fragment, and remove a stray blank line
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-01-26 17:21:31 +01:00