platform/upstream/libxkbcommon.git
7 years agointeractive-wayland: Port to xdg-shell v6
Daniel Stone [Tue, 11 Apr 2017 14:09:50 +0000 (15:09 +0100)]
interactive-wayland: Port to xdg-shell v6

Mutter only implements v6 now, and Weston also implements that. Port
interactive-wayland to this so people can keep on using it.

Signed-off-by: Daniel Stone <daniels@collabora.com>
7 years agoAdd explicit fallthrough case statements
Daniel Stone [Tue, 11 Apr 2017 14:09:23 +0000 (15:09 +0100)]
Add explicit fallthrough case statements

When we fall through to another label in a case, add an explicit comment
noting so, to quiet GCC 7's warnings.

Signed-off-by: Daniel Stone <daniels@collabora.com>
7 years agoBump version to 0.7.1 xkbcommon-0.7.1
Ran Benita [Wed, 18 Jan 2017 18:17:46 +0000 (20:17 +0200)]
Bump version to 0.7.1

Signed-off-by: Ran Benita <ran234@gmail.com>
7 years agoUpdate NEWS
Ran Benita [Wed, 18 Jan 2017 18:16:15 +0000 (20:16 +0200)]
Update NEWS

Signed-off-by: Ran Benita <ran234@gmail.com>
7 years agocompose/doc: note that it is safe to pass the result of getenv() as locale
Ran Benita [Sun, 15 Jan 2017 16:27:22 +0000 (18:27 +0200)]
compose/doc: note that it is safe to pass the result of getenv() as locale

See the NOTES section of getenv(3). Somewhat obscure but it doesn't hurt
to reassure the readers who know about this.

Signed-off-by: Ran Benita <ran234@gmail.com>
7 years agocompose: remove the keysym_from_name cache
Ran Benita [Fri, 2 Dec 2016 20:46:53 +0000 (22:46 +0200)]
compose: remove the keysym_from_name cache

The hit rate is high, but either the cache is slow or the function is
not fast enough -- the cache no longer holds its weight, leading only to
very modest improvements. If it's the former, it can definitely be
improved, the code is very dumb (though it worked just as well as any
other I tried back then). But instead, let's just kill it.

Signed-off-by: Ran Benita <ran234@gmail.com>
7 years agodoc: note that XKB_KEYSYM_CASE_INSENSITIVE does C folding only
Ran Benita [Fri, 2 Dec 2016 21:55:19 +0000 (23:55 +0200)]
doc: note that XKB_KEYSYM_CASE_INSENSITIVE does C folding only

and not locale-dependent.

Signed-off-by: Ran Benita <ran234@gmail.com>
7 years agokeysym: fix locale dependence in xkb_keysym_from_name()
Ran Benita [Fri, 2 Dec 2016 20:15:19 +0000 (22:15 +0200)]
keysym: fix locale dependence in xkb_keysym_from_name()

We currently use strcasecmp, which is locale-dependent. In particular,
one well-known surprise even if restricted just ASCII input is found in
the tr_TR (Turkish) locale, see e.g.
https://msdn.microsoft.com/en-us/library/ms973919.aspx#stringsinnet20_topic5

We have known to avoid locale-dependent functions before, but in this
case, we forgot.

Fix it by implementing our own simple ASCII-only strcasecmp/strncasecmp.
Might have been possible to use strcasecmp_l() with the C locale, but
went the easy route.

Side advantage is that even this non-optimized version is faster than
the optimized libc one (__strcasecmp_l_sse42) since it doesn't need to
do the locale stuff. xkb_keysym_from_name(), which uses strcasecmp
heavily, becomes faster, and so for example Compose file parsing, which
uses xkb_keysym_from_name() heavily, becomes ~20% faster.

Resolves https://github.com/xkbcommon/libxkbcommon/issues/42
Signed-off-by: Ran Benita <ran234@gmail.com>
7 years agoutils: rename popcount to avoid conflict in NetBSD
Ran Benita [Mon, 14 Nov 2016 15:37:35 +0000 (17:37 +0200)]
utils: rename popcount to avoid conflict in NetBSD

Resolves https://github.com/xkbcommon/libxkbcommon/issues/41
Signed-off-by: Ran Benita <ran234@gmail.com>
7 years agoBump version to 0.7.0 xkbcommon-0.7.0
Ran Benita [Fri, 11 Nov 2016 18:02:41 +0000 (20:02 +0200)]
Bump version to 0.7.0

Signed-off-by: Ran Benita <ran234@gmail.com>
7 years agoUpdate NEWS
Ran Benita [Fri, 11 Nov 2016 18:00:26 +0000 (20:00 +0200)]
Update NEWS

Signed-off-by: Ran Benita <ran234@gmail.com>
7 years agoMerge pull request #31 from bluetech/consumed-modes
Ran Benita [Mon, 31 Oct 2016 11:07:45 +0000 (13:07 +0200)]
Merge pull request #31 from bluetech/consumed-modes

Consumed modifiers modes

7 years agostate: add GTK consumed modifiers mode
Ran Benita [Sat, 27 Feb 2016 20:31:16 +0000 (22:31 +0200)]
state: add GTK consumed modifiers mode

This is more or less what is implemented here:
https://git.gnome.org/browse/gtk+/tree/gdk/x11/gdkkeys-x11.c?h=3.19.10#n1131

The implementation here is more technically correct but should provide
the same results.

Try it out with ./test/interactive-evdev -g (modifiers prefixed with "-"
are consumed).

https://bugzilla.gnome.org/show_bug.cgi?id=754110
https://github.com/xkbcommon/libxkbcommon/issues/17

Signed-off-by: Ran Benita <ran234@gmail.com>
7 years agostate: allow different modes for calculating consumed modifiers
Ran Benita [Sat, 27 Feb 2016 17:06:14 +0000 (19:06 +0200)]
state: allow different modes for calculating consumed modifiers

The current functions dealing with consumed modifiers use the
traditional XKB definition of consumed modifiers (see description in the
added documentation). However, for several users of the library (e.g.
GTK) this definition is unsuitable or too eager. This is exacerbated by
some less-than-ideal xkeyboard-config type definitions (CTRL+ALT seems
to cause most grief...).

So, because we
- want to enable alternative interpretations, but
- don't want to expose too much internal details, and
- want to keep things simple for all library users,
we add a high-level "mode" parameter which selects the desired
interpretation. New ones can be added as long as they make some sense.

All of the old consumed-modifiers functions keep using the traditional
("XKB") mode. I mark xkb_state_mod_mask_remove_consumed() and as
deprecated without adding a *2 variant because I don't it is very useful
(or used) in practice.

Alternative modes are added in subsequent commits (this commit only adds
a mode for the existing behavior).

https://github.com/xkbcommon/libxkbcommon/issues/17

Signed-off-by: Ran Benita <ran234@gmail.com>
7 years agoutils: add popcount function
Ran Benita [Sat, 27 Feb 2016 20:29:57 +0000 (22:29 +0200)]
utils: add popcount function

Signed-off-by: Ran Benita <ran234@gmail.com>
7 years agotest/state: move wrongly-placed assert
Ran Benita [Sat, 22 Oct 2016 17:13:11 +0000 (20:13 +0300)]
test/state: move wrongly-placed assert

Signed-off-by: Ran Benita <ran234@gmail.com>
7 years agobench: fix compilation on hurd
Ran Benita [Mon, 19 Sep 2016 07:09:12 +0000 (10:09 +0300)]
bench: fix compilation on hurd

Patch by Samuel Thibault.

https://github.com/xkbcommon/libxkbcommon/issues/39

Signed-off-by: Ran Benita <ran234@gmail.com>
7 years agobench/compose: tabs -> spaces
Ran Benita [Fri, 16 Sep 2016 06:36:27 +0000 (09:36 +0300)]
bench/compose: tabs -> spaces

Signed-off-by: Ran Benita <ran234@gmail.com>
7 years agoREADME: Add basic build directions
Bryce Harrington [Thu, 15 Sep 2016 21:31:55 +0000 (14:31 -0700)]
README: Add basic build directions

In particular, highlight the use of configure flags to control locating
X11 keyboard stuff when building for Wayland.

Of particular note, if the locale root is not specified, then xkbcommon
will look for them under $prefix (i.e. /usr/local/share/X11/locale).
But unless the user has specifically installed them there, it is better
to look in the standard system location, /usr/share/X11/locale.

Otherwise, xkbcommon will error when it can't find them, e.g.:

  xkbcommon: ERROR: ~/.XCompose:4:9: failed to expand %L to the locale Compose file
  xkbcommon: ERROR: ~/.XCompose:4:12: unterminated string literal

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Signed-off-by: Ran Benita <ran234@gmail.com>
7 years agoREADME: Bug *reports* are welcome
Bryce Harrington [Thu, 15 Sep 2016 21:31:54 +0000 (14:31 -0700)]
README: Bug *reports* are welcome

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Signed-off-by: Ran Benita <ran234@gmail.com>
7 years agobench: Check for errors opening Compose file
Bryce Harrington [Thu, 15 Sep 2016 21:12:38 +0000 (14:12 -0700)]
bench: Check for errors opening Compose file

Otherwise it can segfault e.g. running ./compose inside the bench
directory.

Signed-off-by: Bryce Harrington <bryce@bryceharrington.org>
Signed-off-by: Ran Benita <ran234@gmail.com>
7 years agodoc/compat: (! MODIFIER) syntax is parsed but ignored
Ran Benita [Thu, 1 Sep 2016 18:17:43 +0000 (21:17 +0300)]
doc/compat: (! MODIFIER) syntax is parsed but ignored

Signed-off-by: Ran Benita <ran234@gmail.com>
7 years agodoc/compat.md: xkbcomp ignores multiple-keysyms these days
Ran Benita [Thu, 1 Sep 2016 18:13:49 +0000 (21:13 +0300)]
doc/compat.md: xkbcomp ignores multiple-keysyms these days

https://cgit.freedesktop.org/xorg/app/xkbcomp/commit/?id=e119cbec7e750ffc4d4bd08b577db2c697035a30

Signed-off-by: Ran Benita <ran234@gmail.com>
8 years agodoc: Also mention the wayland test client in the quick guide
Bryce Harrington [Thu, 16 Jun 2016 00:36:18 +0000 (17:36 -0700)]
doc: Also mention the wayland test client in the quick guide

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
8 years agodoc: Declare keymap for wayland example
Bryce Harrington [Thu, 16 Jun 2016 00:36:17 +0000 (17:36 -0700)]
doc: Declare keymap for wayland example

keymap was defined in the X11 example, but also define it in the wayland
example just to make it a bit more standalone

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
8 years agodoc: Fix ctx type in example
Bryce Harrington [Thu, 16 Jun 2016 00:36:16 +0000 (17:36 -0700)]
doc: Fix ctx type in example

xkb_context_new() returns a xkb_context pointer, so change the variable
definition to be consistent.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
8 years agoPACKAGING: Update for interactive-wayland
Daniel Stone [Tue, 12 Apr 2016 12:47:26 +0000 (13:47 +0100)]
PACKAGING: Update for interactive-wayland

Signed-off-by: Daniel Stone <daniels@collabora.com>
8 years agotest/interactive-wayland: fix control reaches end of non-void function
Ran Benita [Thu, 9 Jun 2016 14:23:55 +0000 (17:23 +0300)]
test/interactive-wayland: fix control reaches end of non-void function

AFAICS there is nothing that can fail directly in this function, so
change it to void.

Signed-off-by: Ran Benita <ran234@gmail.com>
8 years agokeymap-dump: use consistent order set/latch/lock (style)
Ran Benita [Thu, 9 Jun 2016 13:32:05 +0000 (16:32 +0300)]
keymap-dump: use consistent order set/latch/lock (style)

Signed-off-by: Ran Benita <ran234@gmail.com>
8 years agosrc/state: match_mod_masks can return bool instead of int
Ran Benita [Thu, 9 Jun 2016 12:30:21 +0000 (15:30 +0300)]
src/state: match_mod_masks can return bool instead of int

Signed-off-by: Ran Benita <ran234@gmail.com>
8 years agotest/symbols-leak-test: use more portable shebang
Ran Benita [Thu, 9 Jun 2016 11:52:34 +0000 (14:52 +0300)]
test/symbols-leak-test: use more portable shebang

Some BSDs don't want to give bash the honor of /bin and put it
elsewhere. So look it up in PATH instead.

Signed-off-by: Ran Benita <ran234@gmail.com>
8 years agotest/interactive-wayland: don't ignore asprintf return value
Ran Benita [Thu, 5 May 2016 12:43:59 +0000 (15:43 +0300)]
test/interactive-wayland: don't ignore asprintf return value

Fixes warn_unused_result warning.

Signed-off-by: Ran Benita <ran234@gmail.com>
8 years agotest: use termios instead of system() for disabling terminal echo
Ran Benita [Thu, 5 May 2016 12:41:13 +0000 (15:41 +0300)]
test: use termios instead of system() for disabling terminal echo

Takes care of GCC's annoyingly persistent warn_unused_result warnings.
But it's better to avoid system() I suppose.

Signed-off-by: Ran Benita <ran234@gmail.com>
8 years agogitignore: ignore generated wayland protocol stubs
Ran Benita [Tue, 19 Apr 2016 09:39:24 +0000 (12:39 +0300)]
gitignore: ignore generated wayland protocol stubs

Signed-off-by: Ran Benita <ran234@gmail.com>
8 years agointeractive-wayland: Valgrind-proofing
Daniel Stone [Tue, 12 Apr 2016 12:19:25 +0000 (13:19 +0100)]
interactive-wayland: Valgrind-proofing

More meticulously free everything we create, including hooking up the
buffer-release callback so we actually free those when required. Make
sure seats are actually in the display's seat list.

The xkbcommon object-unref functions don't actually require
NULL-checking, so we can elide those.

Signed-off-by: Daniel Stone <daniels@collabora.com>
8 years agotest: Add interactive-wayland
Daniel Stone [Tue, 12 Apr 2016 11:03:32 +0000 (12:03 +0100)]
test: Add interactive-wayland

interactive-wayland is very similar to x11/xev, and dumps out as much
state as possible.

It provides no titlebar and a completely random cursor, but such is
life.

Signed-off-by: Daniel Stone <daniels@collabora.com>
8 years agoBump version to 0.6.1 xkbcommon-0.6.1
Daniel Stone [Fri, 8 Apr 2016 09:28:36 +0000 (10:28 +0100)]
Bump version to 0.6.1

Our most minor release yet.

Signed-off-by: Daniel Stone <daniels@collabora.com>
8 years agoAdd LICENSE to distributed files
Daniel Stone [Thu, 31 Mar 2016 15:42:41 +0000 (16:42 +0100)]
Add LICENSE to distributed files

Signed-off-by: Daniel Stone <daniels@collabora.com>
8 years agodoc: update reference to compat symbol to its new name
Ran Benita [Fri, 25 Mar 2016 22:53:18 +0000 (01:53 +0300)]
doc: update reference to compat symbol to its new name

Signed-off-by: Ran Benita <ran234@gmail.com>
8 years agoBump version to 0.6.0 xkbcommon-0.6.0
Ran Benita [Wed, 16 Mar 2016 08:18:15 +0000 (10:18 +0200)]
Bump version to 0.6.0

Signed-off-by: Ran Benita <ran234@gmail.com>
8 years agotest: assert/ignore some warn_unused_result's
Ran Benita [Tue, 15 Mar 2016 18:42:21 +0000 (20:42 +0200)]
test: assert/ignore some warn_unused_result's

Signed-off-by: Ran Benita <ran234@gmail.com>
8 years agoMerge pull request #33 from bluetech/travis-enable-x11
Ran Benita [Tue, 15 Mar 2016 18:38:16 +0000 (20:38 +0200)]
Merge pull request #33 from bluetech/travis-enable-x11

travis: remove --disable-x11

8 years agotravis: remove --disable-x11
Ran Benita [Tue, 15 Mar 2016 17:44:48 +0000 (19:44 +0200)]
travis: remove --disable-x11

Looks like the CI machines can use Ubuntu 14.04, which has libxcb 1.10,
which is new enough. Lets see if it works.

Signed-off-by: Ran Benita <ran234@gmail.com>
8 years agoMerge pull request #32 from fooishbar/master
Ran Benita [Tue, 15 Mar 2016 17:53:45 +0000 (19:53 +0200)]
Merge pull request #32 from fooishbar/master

doc: Fix Doxygen include for srcdir != builddir

8 years agotravis: Enable documentation build
Daniel Stone [Tue, 15 Mar 2016 11:30:57 +0000 (11:30 +0000)]
travis: Enable documentation build

Make sure Doxygen is installed before we build.

Signed-off-by: Daniel Stone <daniels@collabora.com>
8 years agodoc: Fix Doxygen include for srcdir != builddir
Daniel Stone [Tue, 15 Mar 2016 11:20:35 +0000 (11:20 +0000)]
doc: Fix Doxygen include for srcdir != builddir

Instead of giving Doxygen a series of absolute paths to the source
files and a relative path to the output directory, run it from the
source directory with purely relative paths to the source files, and
give it an absolute path to the build directory.

This fixes the parsing of README.md with a separate build directory,
since the relative includes for doc/quick-guide.md and doc/compat.md
don't resolve otherwise. Doxygen's INCLUDE_PATH turns out not to fix
this either, since that's just a set of paths to open and parse, rather
than an analogue to cpp's -I.

Signed-off-by: Daniel Stone <daniels@collabora.com>
8 years agoUpdate NEWS
Ran Benita [Sun, 13 Mar 2016 21:38:40 +0000 (23:38 +0200)]
Update NEWS

Signed-off-by: Ran Benita <ran234@gmail.com>
8 years agoNEWS: add some spacing
Ran Benita [Sun, 13 Mar 2016 21:33:18 +0000 (23:33 +0200)]
NEWS: add some spacing

Signed-off-by: Ran Benita <ran234@gmail.com>
8 years agobuild: don't run test/x11comp in make check for now
Ran Benita [Sun, 13 Mar 2016 21:09:21 +0000 (23:09 +0200)]
build: don't run test/x11comp in make check for now

For some reason, the dumped keymap started repeating the two key types
FOUR_LEVEL_PLUS_LOCK and FOUR_LEVEL_KEYPAD. I need to investigate, but
let's disable it for now until I do (the problem would likely not be in
the xkbcommon - at most in the test itself).

Signed-off-by: Ran Benita <ran234@gmail.com>
8 years agotest/x11comp: fix memory leak
Ran Benita [Sun, 13 Mar 2016 20:56:48 +0000 (22:56 +0200)]
test/x11comp: fix memory leak

Signed-off-by: Ran Benita <ran234@gmail.com>
8 years agotest: add a test that all symbol version file is updated
Ran Benita [Sun, 13 Mar 2016 18:56:58 +0000 (20:56 +0200)]
test: add a test that all symbol version file is updated

It is easy to forget to update these files when adding new symbols.

Stolen with slight changes from libinput (commit by Marek Chalupa):
https://cgit.freedesktop.org/wayland/libinput/commit/?id=a9f216ab47ea2f643f20ed741b741a2b5766eba3

Signed-off-by: Ran Benita <ran234@gmail.com>
8 years agoAdd symbol versions forgotten in 0ce17ef3ea3722c1cfe7af3
Ran Benita [Sun, 13 Mar 2016 18:42:39 +0000 (20:42 +0200)]
Add symbol versions forgotten in 0ce17ef3ea3722c1cfe7af3

Signed-off-by: Ran Benita <ran234@gmail.com>
8 years agobuild: make it easier to add non-built (e.g. script) tests
Ran Benita [Sun, 13 Mar 2016 19:32:28 +0000 (21:32 +0200)]
build: make it easier to add non-built (e.g. script) tests

Signed-off-by: Ran Benita <ran234@gmail.com>
8 years agosrc/utils: check if fileno() failed in map_file
Ran Benita [Sun, 13 Mar 2016 18:24:44 +0000 (20:24 +0200)]
src/utils: check if fileno() failed in map_file

fileno() can fail, if called on e.g. fmemopen() FILEs which are not
backed by a file descriptor. This functions uses mmap to map the entire
file to memory, so using such FILEs will not work.

(There is actually no change of behavior here, since the following fstat
would have already failed with EBADF. But lets make it clear.)

Another possibility is to fall back to the !HAVE_MMAP case; but it
sounds like a better idea to leave it to the programmer to use the
new_from_string/new_from_buffer functions instead, instead of doing
double allocation behind their back.

Signed-off-by: Ran Benita <ran234@gmail.com>
8 years agokeymap: share LevelsSameSyms()
Ran Benita [Sat, 27 Feb 2016 22:33:19 +0000 (00:33 +0200)]
keymap: share LevelsSameSyms()

The function is generic enough.

Signed-off-by: Ran Benita <ran234@gmail.com>
8 years agostate: factor out get_entry_for_mods()
Ran Benita [Sat, 27 Feb 2016 22:02:05 +0000 (00:02 +0200)]
state: factor out get_entry_for_mods()

Will be useful later.

Signed-off-by: Ran Benita <ran234@gmail.com>
8 years agostate: factor out entry_is_active() check
Ran Benita [Sat, 27 Feb 2016 17:43:07 +0000 (19:43 +0200)]
state: factor out entry_is_active() check

Makes the code slightly cleaner and I plan to use the function in
another place.

Signed-off-by: Ran Benita <ran234@gmail.com>
8 years agobuild: fix distcheck
Ran Benita [Wed, 20 Jan 2016 21:30:21 +0000 (23:30 +0200)]
build: fix distcheck

File was renamed in 4266402.

Signed-off-by: Ran Benita <ran234@gmail.com>
8 years agodoc: add environment variables index
Ran Benita [Wed, 20 Jan 2016 21:08:08 +0000 (23:08 +0200)]
doc: add environment variables index

Signed-off-by: Ran Benita <ran234@gmail.com>
8 years agodoc: some notes about key names and aliases
Ran Benita [Wed, 20 Jan 2016 20:48:10 +0000 (22:48 +0200)]
doc: some notes about key names and aliases

Signed-off-by: Ran Benita <ran234@gmail.com>
8 years agokeymap: add xkb_keymap_key_by_name(), xkb_keymap_key_get_name(), tests
Mike Blumenkrantz [Wed, 20 Jan 2016 16:40:43 +0000 (11:40 -0500)]
keymap: add xkb_keymap_key_by_name(), xkb_keymap_key_get_name(), tests

xkb_keymap_key_by_name() allows finding a keycode from a given keyname and
is useful for generating keyboard events to use in regression tests
during CI

xkb_keymap_key_get_name() is the inverse of xkb_keymap_key_by_name()

Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
[ran: some stylistic tweaks + another test case]
Signed-off-by: Ran Benita <ran234@gmail.com>
8 years agodoc/keymap-format-text-v1: add title and intro
Ran Benita [Sun, 22 Nov 2015 22:07:15 +0000 (00:07 +0200)]
doc/keymap-format-text-v1: add title and intro

Signed-off-by: Ran Benita <ran234@gmail.com>
8 years agodoc/quick-guide: small improvements
Ran Benita [Sat, 21 Nov 2015 21:17:55 +0000 (23:17 +0200)]
doc/quick-guide: small improvements

Signed-off-by: Ran Benita <ran234@gmail.com>
8 years agodoc/keymap-format-text-v1: convert to markdown
Ran Benita [Sat, 21 Nov 2015 21:12:18 +0000 (23:12 +0200)]
doc/keymap-format-text-v1: convert to markdown

Make it more readable for random browsing.

Signed-off-by: Ran Benita <ran234@gmail.com>
8 years agodoc/keymap-format-text-v1: update info on preserve
Ran Benita [Sat, 21 Nov 2015 20:39:38 +0000 (22:39 +0200)]
doc/keymap-format-text-v1: update info on preserve

Signed-off-by: Ran Benita <ran234@gmail.com>
8 years agosrc/utils: change map_file to not take const string argument
Ran Benita [Wed, 18 Nov 2015 22:44:27 +0000 (00:44 +0200)]
src/utils: change map_file to not take const string argument

map_file() uses PROT_READ, so const seems fitting; however unmap_file
calls munmap/free, which do not take const, so an UNCONSTIFY is needed.
To avoid the UNCONSTIFY hack, which is likely undefined behavior or some
such, just remove the const.

Signed-off-by: Ran Benita <ran234@gmail.com>
8 years agokeymap: fix outdated comment
Ran Benita [Mon, 26 Oct 2015 19:57:39 +0000 (21:57 +0200)]
keymap: fix outdated comment

See 725ae134d434bab6c999121d55dbc3582c4acb65.

Signed-off-by: Ran Benita <ran234@gmail.com>
8 years agodoc/Doxyfile: explicitly set HTML_TIMESTAMP = NO
Ran Benita [Tue, 8 Sep 2015 06:22:20 +0000 (09:22 +0300)]
doc/Doxyfile: explicitly set HTML_TIMESTAMP = NO

YES was the default in older version. Having a timestamp hurts
reproducible builds, and serves no purpose, so remove it.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=789071

Signed-off-by: Ran Benita <ran234@gmail.com>
8 years agodoc/Doxyfile: only keep non-default values
Ran Benita [Tue, 8 Sep 2015 06:21:32 +0000 (09:21 +0300)]
doc/Doxyfile: only keep non-default values

Signed-off-by: Ran Benita <ran234@gmail.com>
8 years agodoc/Doxyfile: sync with latest version
Ran Benita [Tue, 8 Sep 2015 06:17:16 +0000 (09:17 +0300)]
doc/Doxyfile: sync with latest version

Signed-off-by: Ran Benita <ran234@gmail.com>
8 years agostate: reduce scope of fake action
Ran Benita [Mon, 7 Sep 2015 11:45:09 +0000 (14:45 +0300)]
state: reduce scope of fake action

Also rename to "dummy" as I think it is a nicer name.

Signed-off-by: Ran Benita <ran234@gmail.com>
8 years agoMerge pull request #27 from nuko8/osx_test_progs
Ran Benita [Fri, 28 Aug 2015 11:20:20 +0000 (14:20 +0300)]
Merge pull request #27 from nuko8/osx_test_progs

Modifications to make 'make check' test complete for Mac OS X

8 years agobench: Modify benchmarks for a wider range of platforms
Kazunobu Kuriyama [Mon, 24 Aug 2015 04:33:32 +0000 (13:33 +0900)]
bench: Modify benchmarks for a wider range of platforms

 - Add the new files bench.c and bench.h to implement a timer module.
 - Implement the module with clock_gettime(), mach_absolute_time(), or
   gettimeofday(), depending on a given platform.
 - Replace the time measurement code of the benchmark programs with the
   functions of the module.

8 years agotest/x11comp: Fix contention between X11 and Xvfb on Mac OS X
Kazunobu Kuriyama [Mon, 24 Aug 2015 04:44:20 +0000 (13:44 +0900)]
test/x11comp: Fix contention between X11 and Xvfb on Mac OS X

 - Abandon use of -displayfd.
 - Have x11comp itself look for an unused X11 display number instead.

8 years agotest/x11comp: remove duplicate FOUR_LEVEL_KEYPAD from test keymap
Ran Benita [Sun, 23 Aug 2015 20:02:10 +0000 (23:02 +0300)]
test/x11comp: remove duplicate FOUR_LEVEL_KEYPAD from test keymap

The `test/data/keymaps/host.xkb` file contains a duplicate definition of
this type. On my computer (linux, xkbcomp 1.3.0, xserver 1.17.2), the
test passes as is, but if I remove the duplicate definition, the
roundtrip brings it back and the test fails. I can also reproduce it
without relation to the test, by loading `test/data/keymaps/host.xkb`
(without the duplicate) using

    xkbcomp -I $(pwd)/test/data/keymaps/host.xkb $DISPLAY

and downloading it again using

    xkbcomp $DISPLAY out.xkb

the duplicate is added. On Mac OS X however, the duplicate is removed
(correctly), so the test fails there.

xkbcommon itself, which was forked from xkbcomp, doesn't have this bug;
in fact, doing

    ./test/print-compiled-keymap -k keymaps/host.xkb

removes the duplicate if it is present.

This is (probably) a regression in xkbcomp or xserver compared to the
versions used in Mac OS X. Since getting a patch for any of these two is
hopeless from my experience, I did not try to investigate further.

I am not sure why, but if I also add a `PC_SUPER_LEVEL2` type, the
duplicate of `FOUR_LEVEL_KEYPAD` doesn't show up. Hopefully the test
will work on all platforms now.

https://github.com/xkbcommon/libxkbcommon/issues/26

Reported-by: @nuko8
Signed-off-by: Ran Benita <ran234@gmail.com>
8 years agotest/x11comp: small simplifications
Ran Benita [Sun, 23 Aug 2015 19:22:11 +0000 (22:22 +0300)]
test/x11comp: small simplifications

xkbcomp doesn't need the search-path argument, since we pass an absolute
path. Keep the plain -I which clears the search path just to be sure.

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agoMerge pull request #25 from mvo5/master
Ran Benita [Mon, 20 Jul 2015 08:46:15 +0000 (11:46 +0300)]
Merge pull request #25 from mvo5/master

Add XKB_CONFIG_ROOT environment

9 years agoAdd XKB_CONFIG_ROOT environment
Michael Vogt [Fri, 17 Jul 2015 18:59:52 +0000 (20:59 +0200)]
Add XKB_CONFIG_ROOT environment

The XKB_CONFIG_ROOT environment allows overrding the build time
DFLT_XKB_CONFIG_ROOT path.

9 years agobuild: don't fail if linker version scripts are not supported
Ran Benita [Fri, 17 Jul 2015 20:26:20 +0000 (23:26 +0300)]
build: don't fail if linker version scripts are not supported

Some platforms (such as OSX) do not support version scripts. In these
platforms the symbols will not be versioned, but it is OK to omit them.

https://github.com/xkbcommon/libxkbcommon/issues/24

9 years agocompose: correctly parse modifier syntax
Ran Benita [Tue, 24 Mar 2015 14:40:29 +0000 (16:40 +0200)]
compose: correctly parse modifier syntax

As described in:
http://cgit.freedesktop.org/xorg/lib/libX11/commit/?id=ddf3b09bb262d01b56fbaade421ac85b0e60a69f

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agorename to LICENSE
Daniel Stone [Tue, 10 Mar 2015 12:20:01 +0000 (12:20 +0000)]
rename to LICENSE

GitHub uses 'LICENSE' to scrape for repository license information, cf.
https://github.com/blog/1964-open-source-license-usage-on-github-com

Rename to make it a bit easier for it.

9 years agodoc: some editorial changes to compose documentation
Ran Benita [Thu, 19 Feb 2015 15:03:06 +0000 (17:03 +0200)]
doc: some editorial changes to compose documentation

Use nicer Markdown syntax, `surround` some words, fix some typos.

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agotest/common: print keycode in decimal not hex
Ran Benita [Tue, 3 Feb 2015 18:50:52 +0000 (20:50 +0200)]
test/common: print keycode in decimal not hex

Keycodes are usually written in decimal, so hex is hard to compare.

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agoconfigure.ac: also print ${datarootdir} in summary
Ran Benita [Fri, 24 Oct 2014 20:40:24 +0000 (23:40 +0300)]
configure.ac: also print ${datarootdir} in summary

It goes something like:

    ${XLOCALEDIR} ->
    ${datarootdir}/locale/X11 ->
    ${prefix}/share/locale/X11 ->
    /usr/share/locale/X11

But AC_MSG_RESULT only performs one substitution. Instead of starting to
expand this stuff manually, just print datarootdir so all the pieces are
there.

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agoPACKAGING: fix confusing typo
Ran Benita [Fri, 24 Oct 2014 20:06:07 +0000 (23:06 +0300)]
PACKAGING: fix confusing typo

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agodoc: explain the envvars which affect compose
Ran Benita [Fri, 24 Oct 2014 20:03:41 +0000 (23:03 +0300)]
doc: explain the envvars which affect compose

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agokeycodes: use correct printf format
Ran Benita [Thu, 23 Oct 2014 18:03:13 +0000 (21:03 +0300)]
keycodes: use correct printf format

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agoReduce variable scopes
Ran Benita [Thu, 23 Oct 2014 18:00:20 +0000 (21:00 +0300)]
Reduce variable scopes

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agoast-build: remove log message about allocation failure
Ran Benita [Sat, 18 Oct 2014 17:04:57 +0000 (20:04 +0300)]
ast-build: remove log message about allocation failure

We don't do so anywhere else, so until we have something comprehensive,
let's not so here.

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agoxkbcomp: remove file->topName
Ran Benita [Sat, 18 Oct 2014 16:47:19 +0000 (19:47 +0300)]
xkbcomp: remove file->topName

It is useless.

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agoxkbcomp/keymap: remove useless free()
Ran Benita [Sat, 18 Oct 2014 16:22:56 +0000 (19:22 +0300)]
xkbcomp/keymap: remove useless free()

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agoBump version to 0.5.0 xkbcommon-0.5.0
Ran Benita [Sat, 18 Oct 2014 13:41:59 +0000 (16:41 +0300)]
Bump version to 0.5.0

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agoUpdate NEWS
Ran Benita [Sat, 18 Oct 2014 13:35:49 +0000 (16:35 +0300)]
Update NEWS

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agoChange initial symbol file versions to V_0.5.0
Ran Benita [Sat, 18 Oct 2014 13:38:13 +0000 (16:38 +0300)]
Change initial symbol file versions to V_0.5.0

It will be quite confusing to use V_0.4.3 since this was already
released without symbol versioning.

Hopefully this doesn't cause any trouble for people who are using -git.

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agocompose: fill @since TBD
Ran Benita [Sat, 18 Oct 2014 13:37:46 +0000 (16:37 +0300)]
compose: fill @since TBD

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agodoc/compat.md: add compose incompatibilities
Ran Benita [Sat, 18 Oct 2014 13:03:41 +0000 (16:03 +0300)]
doc/compat.md: add compose incompatibilities

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agoAdd PACKAGING file
Ran Benita [Sat, 18 Oct 2014 12:51:41 +0000 (15:51 +0300)]
Add PACKAGING file

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agoMakefile.am: add symbol files to EXTRA_DIST
Ran Benita [Sat, 18 Oct 2014 12:07:37 +0000 (15:07 +0300)]
Makefile.am: add symbol files to EXTRA_DIST

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agoREADME: we also accepts patches through github
Ran Benita [Sat, 18 Oct 2014 11:52:54 +0000 (14:52 +0300)]
README: we also accepts patches through github

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agodocs: make html output have a fixed width, hide footer
Ran Benita [Sat, 18 Oct 2014 11:50:49 +0000 (14:50 +0300)]
docs: make html output have a fixed width, hide footer

It's hard to read text which stretches indefinitely.

The footer is not adding much.

Signed-off-by: Ran Benita <ran234@gmail.com>