Commit graph

77 commits

Author SHA1 Message Date
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
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
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
Peter Hutterer
ad6412624e Add the XWAYLAND extension
This extension exists to serve one purpose: reliably identifying
Xwayland. Previous attempts at doing so included querying root window
properties, output names or input device names. All these attempts are
somewhat unreliable. Instead, let's use an extension - where that
extension is present we have an Xwayland server.

Clients should never need to do anything but check whether the extension
exists through XQueryExtension/XListExtensions.

This extension provides a single QueryVersion request only, and
that is only to provide future compatibility if we ever need anything
other than "this extension exists" functionality.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
2022-08-05 09:51:54 +10:00
Jon Turney
ede86501a4 Win32: Fix collision over 'ControlMask'
Workaround the collision between ControlMask #defined in X11/X.h and
ControlMask used as the name of a structure member in
w32api/processthreadsapi.h in w32api 10.0.0
2022-07-23 23:38:19 +00:00
Austin Shafer
74255ccfd8 DRI3: Add DRI3SetDRMDeviceInUse
DRI3SetDRMDeviceInUse is a hint that lets a client tell the server
what DRM device it is currently using. This lets the server make
more informed decisions for what modifiers to return to the client.

This is needed for proper linux dmabuf feedback with Xwayland
2022-05-25 06:31:56 +00:00
Peter Hutterer
a839f0c7fc XF86keysyms.h: add new keycodes from kernel v5.17
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-03-25 14:46:40 +10:00
Peter Hutterer
914d8f5e0f XF86keysyms.h: add new keycodes from kernel v5.13
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-11-09 10:16:09 +10:00
Alex Richardson
a0ed054ee2 Define LONG64 if __SIZEOF_LONG__ indicates 64-bit long
All modern compilers (GCC>=4.6, Clang>=3.0) define this macro, so we can
use it to detect 64-bit longs without adding to the architecture list.

This change allows me to successfully run a simple X11 window on a
64-bit FreeBSD RISC-V QEMU VM via SSH forwarding. Without this change
I get an error that DISPLAY cannot be opened.

Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
2021-06-15 14:25:01 +01:00
Povilas Kanapickas
d74ffaed91 include: Add support for XI 2.4 gesture input events
Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
2021-05-11 01:45:27 +03:00
Olivier Fourdan
b6bc35b845 xfixes: Add ClientDisconnectMode
The Xserver itself is capable of terminating itself once all X11 clients
are gone, yet in a typical full session, there are a number of X11
clients running continuously (e.g. the Xsettings daemon, IBus, etc.).

Those always-running clients will prevent the Xserver from terminating,
because the actual number of X11 clients will never drop to 0.

To solve this issue directly at the Xserver level, this add new entries
to the XFixes extension to let the X11 clients themselves specify the
disconnect mode they expect.

Typically, those X11 daemon clients would specify the disconnect mode
XFixesClientDisconnectFlagTerminate to let the Xserver know that they
should not be accounted for when checking the remaining clients prior
to terminate.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
2021-04-29 05:48:29 +00:00
Pierre Le Marre
25f3278b85
Deprecate XK_approxeq and XK_notapproxeq.
Fixes #20
2021-03-11 21:18:38 +01:00
Peter Hutterer
a657dd0b45 meson.build: use built-in variable substitution handling instead of sed
Generated outputs are identical

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-03-10 09:41:59 +00:00
Hannah Rittich
4901f35cac Corrected comments in keysymdef.h. 2021-03-01 21:20:24 +00:00
Peter Hutterer
08549dc858 XF86keysym.h: fix a few references to invalid keys
No change to the header, comments only.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-02-17 10:17:54 +10:00
Peter Hutterer
ea9cf61a10 XF86keysyms.h: add some keycodes from kernels 2.6.11 and earlier
These keysyms were already present in 2.6.11 which is the first tag in git.

A few notes on specific keys here:
- KEY_EJECTCLOSECD is theoretically different to XF86XK_Eject (kernel
  KEY_EJECTCD) but the actual usage in the hwdb remappings seems to be
  random. Either way it's already mapped to XF86XK_Eject in
  symbols/inet so let's just add an entry for the sake of documenting it.
- XF86XK_CycleAngle seems like the best match for KEY_ANGLE

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-02-08 14:52:02 +10:00
Peter Hutterer
577a56840b XF86keysyms.h: add comments for some keycodes from 2.6.1x kernels
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-02-08 14:52:02 +10:00
Peter Hutterer
941d3952d3 XF86keysyms.h: add some keycodes from 2.6.2x kernels
A few notes on specific keys here:
- Some existing keysyms used some brand names. e.g. KEY_WORDPROCESSOR ->
  existing XF86XK_Word. This introduces some minor inconsistency with
  unbranded new keys like KEY_GRAPHICSEDITOR -> XF86XK_GraphicsEditor.
- XF86XK_DisplayToggle is *not* XF86XK_Display (which represents
  KEY_SWITCHVIDEOMODE)

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-02-08 14:52:02 +10:00
Peter Hutterer
7f20931985 XF86keysyms.h: add some keycodes from 2.6.3x kernels
A few notes on specific keys here:
- There are exiting XF86XK_ZoomIn/Out keys, but they don't seem appropriate
  for KEY_CAMERA_ZOOMIN and friends. New symbols are introduced here.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-02-08 14:52:02 +10:00
Peter Hutterer
c52d104fdc XF86keysyms.h: add comment for new keycodes from kernel v3.1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-02-08 14:52:02 +10:00
Peter Hutterer
5ffc4c4baa XF86keysyms.h: add new keycodes from kernel v3.10
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-02-08 14:52:02 +10:00
Peter Hutterer
0519088bc6 XF86keysyms.h: add new keycodes from kernel v3.13
ALSToggle has a terrible name, it's the Ambient Light Sensor. But it matches
the kernel define so...

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-02-08 14:52:02 +10:00
Peter Hutterer
7dbe7b7a36 XF86keysyms.h: add new keycodes from kernel v3.16
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-02-08 14:52:02 +10:00
Peter Hutterer
ef0e6b8e21 XF86keysyms.h: add new keycodes from kernel v3.18
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-02-08 14:52:02 +10:00
Peter Hutterer
caca9d41b2 XF86keysyms.h: add new keycodes from kernel v4.1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-02-08 14:52:02 +10:00
Peter Hutterer
0f8b4d48b9 XF86keysyms.h: add new keycodes from kernel v4.7
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-02-08 14:52:02 +10:00
Peter Hutterer
9b54c3c539 XF86keysyms.h: add new keycodes from kernel v4.12
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-02-08 14:52:02 +10:00
Peter Hutterer
58f5208d87 XF86keysyms.h: add new keycodes from kernel v4.13
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-02-08 14:52:02 +10:00
Peter Hutterer
8ad9743ccd XF86keysyms.h: add comment for new keycodes from kernel v4.16
This keysym is already available under a different name, see
000ebed576

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-02-08 14:52:02 +10:00
Peter Hutterer
8ed8a8064b XF86keysyms.h: add new keycodes from kernel v5.1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-02-08 14:52:02 +10:00
Peter Hutterer
901330ae05 XF86keysyms.h: add new keycodes from kernel v5.2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-02-08 14:52:02 +10:00
Peter Hutterer
b87f02fe15 XF86keysyms.h: add new keycodes from kernel v5.5
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-02-08 14:52:02 +10:00
Peter Hutterer
d110d97e34 XF86keysyms.h: add new keycodes from kernel v5.6
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-02-08 14:52:02 +10:00
Peter Hutterer
c833b7c0e9 XF86keysyms.h: add new keycodes from kernel v5.10
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-02-08 14:52:02 +10:00
Peter Hutterer
5dbb5b7659 XF86keysym.h: reserve a range for Linux kernel keysyms
The Linux kernel adds a few evdev keycodes roughly every other release. These
aren't available as keysyms through XKB until they have been added as keycode
in xkeyboard-config and mapped there to a newly defined keysym in the X11
proto headers.

In the past, this was done manually,  a suitable keysym was picked at
random and the mapping updated accordingly. This doesn't scale very well and,
given we have a large reserved range for XF86 keysyms anyway, can be done
easier.

Let's reserve the range 0x10081XXX range for a 1:1 mapping of Linux kernel
codes. That's 4095 values, the kernel currently uses only 767 anyway. The
lower 3 bytes of keysyms within that range have to match the kernel value to
make them easy to add and search for. Nothing in X must care about the actual
keysym value anyway.

Since we expect this to be parsed by other scripts for automatic updating, the
format of those #defines is quite strict. Add a script to generate keycodes as
well as verify that the existing ones match the current expected format.

The script is integrated into the CI and meson test, so we will fail if an
update breaks the expectations.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-02-08 14:52:02 +10:00
Peter Hutterer
32ada053a3 Remove misleading comment about not adding syms to XF86keysym.h
We've been adding to those over the last few years. Not a huge amount but
enough that we should stop pretending we don't touch that header.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-01-18 11:48:23 +10:00
Alan Coopersmith
21e05da99c XKB: Mark key name arrays as not NUL-terminated strings
They are fixed length (4 characters), and don't need NUL-terminators.
This makes gcc stop warning when they're not NUL-terminated, and instead
warn if they are passed to functions expecting NUL-terminated strings.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2020-10-10 14:22:35 -07:00
Alan Coopersmith
50671520ef Xfuncproto: define _X_NONSTRING for __attribute__((nonstring))
Bumps xproto version to 7.0.33

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2020-10-10 14:22:24 -07:00
Alan Coopersmith
09602b2130 Fix spelling/wording issues
Found by using:
  codespell --builtin clear,rare,usage,informal,code,names

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2020-08-08 10:33:56 -07:00
Samuel Thibault
a8ccf66bc9 keysymdef: Fix left/rightanglebracket Unicode equivalent
As of version 7.7, the X protocol does not define a Unicode equivalent for
them.  The U+27E8 and U+27E9 equivalents were introduced by 618956f1f ("The
big keysym cleanup, to bring implementation in line with the recent revision
of Appendix A of the protocol spec."), but as xterm Patch #226 explicitly
notes, U+2329 and U+232A should be used rather than U+27E8 and U+27E9.  Gtk
also inherited this.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2020-07-07 14:42:40 +02:00
Samuel Thibault
39eb59740d keysymdef.h: Fix the documented perl regexp
+ is interpreted when not escaped.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2020-07-07 13:31:37 +02:00
Samuel Thibault
959d4442e4 keysymdef: Add Hangul unicode equivalents
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2020-07-07 11:24:04 +02:00
Samuel Thibault
84986de39b keysymdef: Add vietnamese dead accents
These are used in the vn layout.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2020-07-07 09:46:40 +02:00
Sebastian Wick
15329c5a0d XF86keysym: Add XF86XK_FullScreen
Add XF86XK_FullScreen keysym, to be used as mapping for evdev's
KEY_FULL_SCREEN.

Chromebooks have a special media key for toggling full screen mode.

Signed-off-by: Sebastian Wick <sebastian@sebastianwick.net>
2020-03-09 16:44:31 +01:00