Commit graph

2775 commits

Author SHA1 Message Date
Pierre Le Marre
ba0d32820b keysyms: Relax evdev keysyms naming convention
Try to follow the X11 general guidelines more closely:

> Keysyms identify characters or *functions* associated with each key.
> […] This file assigns *mnemonic* macro names for these keysyms.

> [Keysym design] makes it easier to write a *portable* application.

Key points:
- Better naming is better self-documentation: abstruse keynames and
  jargon (e.g. acronyms) may lead to misuse.
- Keysyms share a common namespace: generic names should be reserved
  to actual generic functions, else it is better to use a relevant
  prefix, e.g. `XF86XK_OK` is acceptable but `XF86XK_Title` is ambiguous
  and better renamed with the prefix `Media`: `XF86XK_MediaTitleMenu`.
- Lookup the evdev keys is kept simple thanks to the strict formatting
  rules.

Part-of: <https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/merge_requests/93>
2025-07-20 18:11:51 +02:00
Alan Coopersmith
1914233e66 Xfuncproto: define _X_FALLTHROUGH for modern compilers
Can be used to tell the compiler that fallthrough between cases in
a switch statement is intentional.  Handles gcc >= 7 and clang >= 12
as well as all C23-compliant compilers.

Bumps xproto version to 7.0.34.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/merge_requests/96>
2025-04-22 09:59:16 -07:00
Peter Hutterer
9d5e1d1dc1 CI: add workflow rules
Required for pipelines to run after some infrastructure changes, see
https://gitlab.freedesktop.org/freedesktop/freedesktop/-/issues/438

Part-of: <https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/merge_requests/95>
2025-02-03 13:56:30 +10:00
Alan Coopersmith
4e4c48d305 kbproto: Add 'Requires: xproto >= 7.0.33' for _X_NONSTRING usage
Commit 21e05da99c made the XKB headers depend on the definition
of _X_NONSTRING added in commit 50671520ef which raised the
version in the xproto.pc to 7.0.33.  While this is automatically
handled for those using unmodified upstream xorgproto releases, adding
this may help make it easier to diagnose errors like those reported in
issue #51 where headers are being mixed across releases.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/merge_requests/94>
2025-01-14 15:04:35 -08:00
psykose
e312ab76c4 Xpoll.h.in: use standard poll.h include
avoids a bunch of warnings when building against musl libc that warns
on this pedantically:

```
In file included from /usr/include/X11/Xpoll.h:166:
/usr/include/sys/poll.h:1:2: warning: redirecting incorrect #include <sys/poll.h> to <poll.h> [-W#warnings]
```

Part-of: <https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/merge_requests/92>
2024-11-17 08:36:09 +01:00
Enrico Weigelt, metux IT consult
af7cb6a643 gitignore: Add *~ for editor backups.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/merge_requests/87>
2024-10-08 13:04:58 +02:00
Gergo Koteles
d7ea44d5f0 Add latest available keys from Linux kernel v6.10
Part-of: <https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/merge_requests/91>
2024-09-05 09:32:56 +00:00
Enrico Weigelt, metux IT consult
3076552555 securproto.h: fix missing include of Xmd.h
This header needs a bunch of types defined in Xmd.h. Consumers currently
need to explicitly care about correct include order, which isn't exactly
gently programming style. Instead headers should include anything they
need themselves.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/merge_requests/90>
2024-07-23 09:24:44 +02:00
Enrico Weigelt, metux IT consult
db913d0f14 recordproto.h: fix missing include of Xmd.h
This header needs a bunch of types defined in Xmd.h. Consumers currently
need to explicitly care about correct include order, which isn't exactly
gently programming style. Instead headers should include anything they
need themselves.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/merge_requests/90>
2024-05-07 16:05:19 +02:00
Erik Kurzinger
68de489ec6 Present: clarify PresentPixmapSynced idle event behavior
PresentIdleNotify events will not be delivered for PresentPixmapSynced
requests. This should be stated explicitly in the protocol specification.

Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com>
2024-03-29 14:06:01 -07:00
Olivier Fourdan
6746971105 xorgproto 2024.1
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
2024-03-25 15:07:16 +01:00
Erik Kurzinger
62323c75c8 Present: add PresentPixmapSynced
Adds an augmented version of PresentPixmap supporting explicit
synchronization with a direct rendering device. This takes the form of
timeline DRM synchronization objects, along with acquire and release
points on those timelines. Implementations advertising
PresentCapabilitySyncobj will wait for the acquire point to be signaled
before executing the PresentPixmap request, and signal the release point
after any GPU operations on the pixmap have completed.

Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com>
2024-03-25 06:56:52 -07:00
Erik Kurzinger
bf661c1c34 DRI3: add DRI3ImportSyncobj and DRI3FreeSyncobj
Adds new protocol to the DRI3 extension for importing DRM
synchronization objects provided by clients. These can be used to enable
explicit synchronization between the client, the direct rendering
device, and the server.

Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com>
2024-03-22 08:09:59 -07:00
José Expósito
db56b508f2 meson: add header paths to declare_dependency
The `install_headers()` function is used to install the headers present
in `include/<subdirectory>`.

However, when `xorgproto` is used as a subproject, the headers are not
copied and the parent project is not able to find the headers included
in subdirectories.

For example, this error is generated when `xserver` is built with
`xorgproto` as a subproject:

    fatal error: xf86dri.h: No such file or directory
       41 | #include "xf86dri.h"
          |          ^~~~~~~~~~~

This is a known issue present in Meson:
https://github.com/mesonbuild/meson/issues/2546

To workaround the issue, add the required subdirectories to
`declare_dependency()`.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
2024-02-08 05:08:47 +00:00
Pierre Le Marre
cd33097fc7
keysyms: Improve doc & comments for non-deprecated aliases
Use “non-deprecated alias for…” instead of plain “alias for” to make
clear that an alias is endorsed and not deprecated.
2024-02-07 11:16:26 +01:00
Pierre Le Marre
44b8ab4645
keysyms: Note that some canonical names may be deprecated 2024-02-07 11:15:32 +01:00
Pierre Le Marre
1b9bd55b31
keysyms: Make some comments more standard 2024-02-06 20:41:01 +01:00
Pierre Le Marre
417b5c4999
keysyms: Fix typo in XK_guillemotright comment 2024-02-06 20:39:46 +01:00
Pierre Le Marre
fe12c51027
keysyms: Add regex for keysyms with Unicode annotation in angle brackets 2024-02-03 18:13:07 +01:00
Pierre Le Marre
fbd19fa7e5
keysyms: Add warning about removals & canonical names changes 2024-02-03 18:13:06 +01:00
Pierre Le Marre
e9a98ce6a7
keysyms: Revert removals and postpone effective deprecation
Recent removals & deprecations of keysyms have caused quite a lot of
trouble:
- Removed keysyms *were* used in the wild, especially the dead keys:
  e.g. in Neo-like and Bépo-like layouts.
  While checking for keysyms use in xkeyboard-config database is a
  mandatory first step, it is not enough.
- Removed keysyms broke Qt build.
- Deprecated names are now replaced by their new non-deprecated version.
  It is problematic in the case that a sandbox application (e.g. with
  flatpak) uses X11 or xkbcommon libraries older than the system’s one:
  they are not able to parse the new names.

For the sake of the stability, this commit restore all previous keysyms
and introduces the new names as alternative. While the comments mark
some names as “deprecated”, they will remain the canonical names (i.e.
they are *output* by `xkbcomp` and `xkbcommon`) for the next 10 years.

Details of the modified commits:
- "keysymdef.h: add better names for the dead schwa and SCHWA symbols"
  (commit e5cccecd81)
- "keysymdef.h: delete four symbolic names that serve no purpose"
  (commit cb44799b72)
- "keysymdef.h: name the masculine ordinal indicator similar to feminine one"
  (commit 3ddfc98036)
- "keysymdef.h: add correctly spelled names for the left and right guillemet"
  (commit 8cfcc91a3f)
2024-02-03 18:12:56 +01:00
Pierre Le Marre
1c8128d72d
Keysyms: Update XF86Keysyms.h
Add latest available keys from Linux kernel (git master).
2023-09-28 06:09:27 +02:00
Pierre Le Marre
df4d063b74
keysyms headers: Make some aliases explicit
Mark some alias deprecated, as per keysymdef.h rules.

Notable changes:
- HP deprecated aliases.
- Ooblique, ooblique: deprecated in favor more explicit names.
- Arabic_farsi_yeh: deprecated, could induce in error with Arabic_yeh.
- Greek_LAMBDA, Greek_lambda: non deprecated aliases, as there seem to
  be not common agreeement between standard and literature.
- Armenian_verjaket, Armenian_but, Armenian_yentamna, Armenian_amanak,
  Armenian_shesht, Armenian_paruyk: deprecated in favor of the Unicode
  name. Currently not used in xkeyboard-config.
2023-09-27 09:01:41 +02:00
Pierre Le Marre
f43c0b7e5d
keysymdef.h: Normalize Unicode mappings
- Normalize codepoint format to upper case.
- Fix Unicode standard names: use *corrected* names.
- Add missing Unicode mappings (see hereinafter).

Some special keysyms have Unicode mappings in both X11 and xkbcommon,
but they are not documented. As these mappings are not one-to-one, we
introduce the concepts of generic/specific compatible semantics:

- Generic keysyms such as as `Space` have a standard Unicode annotation;
- Specialized keysyms such as `KP_Space` have the same standard Unicode
  annotation between angle brackets.
2023-09-27 09:01:11 +02:00
Pierre Le Marre
2b9fcd0d95
keysyms headers: Normalize keysyms value format & padding
- Harmonize format by using lower case hexadecimal notation.
- Normalize keysym padding: use spaces instead of tabulations
  with the same amount everywhere.
- Update generator to new format.
2023-09-27 08:59:55 +02:00
Pierre Le Marre
704a75eecd
keysymdef.h: Improve comment of two keysyms
- `Greek_IOTAdiaeresis`: make clear that the keysym is deprecated
  (due to a typo).
- `Thai_maihanakat_maitho`: there is a Unicode mapping to U+0E3E in
  both libx11 and xkbcommon, but the code point is unassigned.
  Document this mapping and deprecate the keysym.
2023-07-19 21:34:37 +02:00
Pierre Le Marre
7bc5178139
keysymdef.h: Improve doc on deprecated keysyms
The documentation on deprecated keysyms lacks precision for two cases,
which are fixed by this commit:

- Explicit aliases (comment: “alias for XXX”) are not deprecated.
- A keysym can be explicitly deprecated by starting its comment with
  “deprecated”.
2023-07-19 18:50:20 +02:00
Pierre Le Marre
4b673589d6
keysymdef.h: Fix typo for Mode_switch aliases
Keysyms names are case-sensitive, so rewrite `mode_switch` into
`Mode_switch` in the comment of `Mode_switch` aliases.
2023-07-19 18:34:56 +02:00
Mohamed Akram
b11152992d keysymdef.h: add dead_hamza symbol
It is intended to be added to the ara(mac-phonetic) and my(phonetic) layouts on
the <BKSL> key. They are based on the following layouts listed in the CLDR:

- https://github.com/unicode-org/cldr/blob/main/keyboards/osx/ar-t-k0-osx-qwerty.xml
- https://github.com/unicode-org/cldr/blob/main/keyboards/osx/ms-t-k0-osx.xml

In CLDR, the dead keys are defined in the <transforms> section. Hamza “ء” is
used there in the first position, making it a dead key. Now, among the keys
that produce this character, E02 has transform="no" while D13 has not. So hamza
on D13 is a dead key but it is not on E02.

The compose sequences required for the mentioned layouts are intended to be
added to libX11. Specifically, dead_hamza with alef, waw and yeh to generate
hamzaonalef, hamzaonwaw, and hamzaonyeh, respectively. Additional sequences
might be added as necessary.
2023-07-06 12:08:27 +04:00
Olivier Fourdan
7669673222 xorgproto 2023.2
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
2023-06-16 09:17:19 +02:00
Olivier Fourdan
85e11a6b73 presentproto: Update version number to 1.3
Bump the presentproto version to 1.3 in the pkg-config file,
presentproto.txt and presenttokens.h.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Fixes: 5a3d5d624 - present: add PresentOptionAsyncMayTear
2023-06-13 17:28:21 +02:00
Olivier Fourdan
16ca6a5c59 xorgproto 2023.1
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
2023-06-05 09:09:04 +02:00
Demi Marie Obenour
6b1012c29c Allow client to force server to terminate if it exits
This is intended to be used by screen lockers, where the server must
exit if the screen locker does, to avoid a security hole.  As suggested
by Alan Coopersmith, this is implemented using a new flag for the
disconnect mode of the XFixes extension.  Includes wording suggestions
from Peter Hutterer.

Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
2023-06-01 11:34:37 -04:00
Xaver Hugl
5a3d5d624e present: add PresentOptionAsyncMayTear 2023-05-24 14:05:16 +02:00
Dimitry Andric
6c3a7302fc Xos.h: include <strings.h> on FreeBSD for index/rindex
Adding index() and rindex() as macros wreaks havoc with several libc++
headers, which liberally use the name 'index' for variables, functions,
and more. Get the declarations from <strings.h> instead, where they have
been for at least two decades.

Signed-off-by:	Dimitry Andric <dimitry@andric.com>
2023-05-20 17:13:28 +02:00
Benno Schulenberg
c85a6ff7bd hyphenate two compound adjectives, like for the other occurrence 2023-05-18 16:32:53 +02:00
Michael Wyraz
7131a5bec5 Be more descriptive about monitor types
Be more descriptive about user defined vs default monitors in randr and allow more than one virtual monitor per physical output
2023-04-27 04:38:45 +00:00
Benno Schulenberg
e5cccecd81 keysymdef.h: add better names for the dead schwa and SCHWA symbols
The new names (`dead_schwa` and `dead_SCHWA`) fit much better with
the `dead_a`, `dead_A` scheme for the other vowels, and also with
how other upper- and lowercase schwa symbols are named.

The old names are deprecated, and can be removed quite soon because
they are not used anywhere -- not in xkeyboard-config at least.

(The dead vowel symbols were introduced fifteen years ago in commit
935dd37be4, to support compose sequences for Amharic, but neither
libX11 nor xkeyboard-config were ever updated to make use of them.)

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2023-04-21 21:54:25 +00:00
Benno Schulenberg
cb44799b72 keysymdef.h: delete four symbolic names that serve no purpose
Ten years ago, in commit 6d4acb0e3a, these four keysyms were added
to support new compose sequences that then could be typed with the
newish German T3 layout -- or at least, that was the intention.

The commit was in response to https://bugs.freedesktop.org/62189,
right before I retracted the patch after learning that there are no
precomposed characters that use those four symbols as diacritics.

The commit should have been reverted then, but... it lingered and
was forgotten.  No layout in xkeyboard-config uses these symbols
(obviously, as they serve no purpose) and meanwhile the T3 layout
itself has become obsolete [1], so... it's time to clean up.

  [1] https://de.wikipedia.org/wiki/DIN_2137#Neufassung_2018

  "die Belegung T3 wird nicht mehr definiert, da die Erfahrung gezeigt
   hat, dass eine solche Tastatur ohnehin nicht produziert wird"

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2023-04-13 16:13:17 +02:00
Peter Hutterer
fca42f2e5a Revert "keysymdef.h: delete fourteen long-deprecated symbol names"
Turns out the server still used one of those, see [1] and removing those
breaks the build. Let's revert this for now and we can re-visit in a few
xserver releases time.

[1] https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1099

This reverts commit 3b2a6b10e6.
2023-03-28 07:05:11 +10:00
Benno Schulenberg
3b2a6b10e6 keysymdef.h: delete fourteen long-deprecated symbol names
They have been deprecated for more than twenty years,
and were either misspelled or too specifically named.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2023-03-25 17:47:53 +00:00
Benno Schulenberg
3ddfc98036 keysymdef.h: name the masculine ordinal indicator similar to feminine one
The symbolic name for the feminine ordinal indicator is 'ordfeminine',
so the name for the masculine ordinal indicator should be 'ordmasculine'
instead of just 'masculine'.  Deprecate this latter form.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2023-03-25 17:47:53 +00:00
Benno Schulenberg
8cfcc91a3f keysymdef.h: add correctly spelled names for the left and right guillemet
And deprecate the misspelled ones -- guillemots are seabirds [1],
guillemets are the sideways double chevrons [2].

  [1] https://en.wikipedia.org/wiki/Guillemot
  [2] https://en.wikipedia.org/wiki/Guillemet

This will allow to finally use properly spelt symbol names
in the layouts of xkeyboard-config.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2023-03-25 17:47:53 +00:00
Alan Coopersmith
9fa55c4115 XvMCproto.h: remove ; from the end of sz_* definitions
Fixes compiler errors of "unexpected ';' before ')'" when calling
the SIZEOF macro on XvMC requests.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-03-19 13:47:03 -07:00
Alan Coopersmith
cf35a91fe5 Only install PM_spec when legacy protocol support is enabled
PM_spec is the spec for the Proxy Management Protocol, and the other
files for that protocol are only installed if legacy protocols
are requested from configure or meson

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-03-16 13:24:51 -07:00
Alan Coopersmith
423098656f Remove "All rights reserved" from Oracle copyright notices
Oracle no longer includes this term in our copyright & license notices.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-02-24 16:36:43 -08:00
Alan Coopersmith
1b6e63b2c3 meson: replace deprecated source_root with new project_source_root
Fixes deprecation warning for meson 0.56.0 and later.
Raises minimum meson version to 0.56.0.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-01-10 16:21:15 -08:00
Alan Coopersmith
3fd47893c5 meson: replace join_paths with /
Sets minimum meson version to 0.50.0 due to use of:
 * 0.49.0: {'/ with string arguments'}
 * 0.50.0: {'install arg in configure_file'}

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-01-10 16:20:42 -08:00
Alan Coopersmith
1a1e0a82b1 gitlab CI: run meson instead of ninja for test & install steps
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-01-10 16:10:55 -08:00
Alan Coopersmith
9740bd9bfa Remove _X_NONNULL macro
We could not find any evidence it was ever used, but defining it
caused C++11 compilers to complain:

/usr/X11R6/include/X11/Xfuncproto.h:173:24:
warning: ISO C does not permit named variadic macros [-Wvariadic-macros]
 #define _X_NONNULL(args...)  __attribute__((nonnull(args)))

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-09-29 17:25:53 -07:00