summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* travis: ensure all tests are valgrind-cleantravis-valgrindRan Benita2017-12-121-2/+2
| | | | | | | The tests will fail if they have any memory leaks or perform invalid accesses. Signed-off-by: Ran Benita <ran234@gmail.com>
* xkbcomp/ast-build: fix memory leak when appending multi-keysymsRan Benita2017-12-122-3/+4
| | | | | | `syms` was not freed. Signed-off-by: Ran Benita <ran234@gmail.com>
* keymap: fix NULL dereference when dumping the default fallback typeRan Benita2017-12-123-5/+5
| | | | | | | | | | | | | The default fallback type uses type->level_names = NULL but the keymap-dump code was not checking this case. Instead of adding more workarounds and possible bugs (e.g. previous commit), let's just keep the number of level names separately. This has the additional advantage retains extraneous level name if someone adds them for some reason. Signed-off-by: Ran Benita <ran234@gmail.com>
* xkbcomp/types: fix types being assigned the wrong number of levels in some ↵Ran Benita2017-12-121-1/+2
| | | | | | | | | | | | | | | | | circumstances The buggy code assigned the number of levels based on the number of level names in the definition, instead of the actual number of levels! This would completely break type definitions which do not give names to levels. This was not noticed for so long because xkeyboard-config always gives names to all levels. This regressed in 61fed8dab9b8e27981f36ffc96666d7376546e30. Reported-by: Gatis Paeglis <gatis.paeglis@qt.io> Signed-off-by: Ran Benita <ran234@gmail.com>
* keysym: add xkb_keysym_to_{lower,upper} to public APIRan Benita2017-12-115-8/+41
| | | | | | | | | | | | | | | | | | | These can be useful in some odd cases. There is already an implementation (+ tests) for internal use, so all that's needed is to export them. If xkbcommon were to provide a way to convert a Unicode codepoint to a keysym, this could have been implemented externally as follows: uint32_t codepoint = xkb_keysym_to_utf32(keysym); uint32_t upper_codepoint = my_unicode_library_to_upper(codepoint); xkb_keysym_t upper_keysym = theoretical_xkb_keysym_from_utf32(upper_codepoint); However keysym -> codepoint is not injective so such a function is not possible strictly speaking. Signed-off-by: Ran Benita <ran234@gmail.com>
* test/data: sync with xkeyboard-config 2.22Ran Benita2017-12-0323-336/+1640
| | | | | | | Some tweaks to the de(neo) keyseq tests were required. It seems to have improved. Signed-off-by: Ran Benita <ran234@gmail.com>
* Merge pull request #53 from whitslack/missing-ucs-codesRan Benita2017-10-031-1/+2
|\ | | | | keysym-utf: Add missing codes for signifblank and permille keysyms
| * keysym-utf: Add missing codes for signifblank and permille keysymsMatt Whitlock2017-09-281-1/+2
|/
* build/meson: require meson >= 0.41.0Ran Benita2017-09-101-0/+1
| | | | | | | | With previous versions, the compilation fails with linker errors. Fixes https://github.com/xkbcommon/libxkbcommon/issues/52 Reported-by: @rezso Signed-off-by: Ran Benita <ran234@gmail.com>
* expr: paper over a maybe-uninitialized warningRan Benita2017-09-081-2/+2
| | | | Signed-off-by: Ran Benita <ran234@gmail.com>
* test/interactive-wayland: avoid unused function warning due to configurationRan Benita2017-08-161-10/+12
| | | | | | test/interactive-wayland.c:95:1: warning: ‘set_cloexec_or_close’ defined but not used [-Wunused-function] Signed-off-by: Ran Benita <ran234@gmail.com>
* build: add missing configure function checks for test/interactive-waylandRan Benita2017-08-162-1/+7
| | | | Signed-off-by: Ran Benita <ran234@gmail.com>
* xkbcommon-compose.h: change recommended locale fallback code to treat empty ↵Ran Benita2017-08-131-3/+4
| | | | | | | | | | | | | | | | | | | | | string same as unset The previous code would cause failures to find the Compose file if one of the environment variables LC_ALL, LC_CTYPE or LANG are set to the empty string. The description of the fallback procedure in loclale(7) talks about "non-null environment variable"; I interpreted this to mean the environment variable is unset, but it actually means unset or empty (I verified this by looking at what glibc and musl do). A recent bug in systemd https://github.com/systemd/systemd/issues/6407 exposed this issue. It causes these these variables to be set to the empty string in TTY sessions. Reported by "doodoo" in https://bbs.archlinux.org/viewtopic.php?id=228658 Signed-off-by: Ran Benita <ran234@gmail.com>
* Bump version to 0.7.2xkbcommon-0.7.2Ran Benita2017-08-042-2/+2
| | | | Signed-off-by: Ran Benita <ran234@gmail.com>
* Update NEWSRan Benita2017-08-041-0/+46
| | | | Signed-off-by: Ran Benita <ran234@gmail.com>
* build/autotools: fix doc installationRan Benita2017-08-041-2/+2
| | | | Signed-off-by: Ran Benita <ran234@gmail.com>
* test/symbols-leak-test.bash: make it easier to readRan Benita2017-08-031-15/+7
| | | | Signed-off-by: Ran Benita <ran234@gmail.com>
* build/autotools: fix symbol versioning configure checkRan Benita2017-08-021-1/+1
| | | | | | | | | Regressed in 4309735. I thought `$top_srcdir` works in configure too, apparently not! See: https://github.com/xkbcommon/libxkbcommon/issues/50#issuecomment-319693694 Signed-off-by: Ran Benita <ran234@gmail.com>
* build/autotools: make doxygen's input relativeRan Benita2017-08-021-7/+7
| | | | | | Was meant to be a part of 41bea9a. Signed-off-by: Ran Benita <ran234@gmail.com>
* build/autotools: dist the meson build filesRan Benita2017-08-011-0/+2
| | | | | | | So that it's possible to build with meson from autotools-generated tarballs. Signed-off-by: Ran Benita <ran234@gmail.com>
* build/autotools: install documentation under html/Ran Benita2017-08-011-1/+1
| | | | | | | To be consistent with the meson build; also makes more sense as doxygen can generate more than html (though we currently are not doing that). Signed-off-by: Ran Benita <ran234@gmail.com>
* build: make doxygen run from the source treeRan Benita2017-08-014-14/+24
| | | | | | I couldn't find any other way to make this work! Signed-off-by: Ran Benita <ran234@gmail.com>
* Merge pull request #49 from bluetech/mesonRan Benita2017-07-3111-103/+564
|\ | | | | build: add meson build system
| * build: add meson build systemRan Benita2017-07-316-21/+564
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Meson is easier to maintain, much faster, encourages better practices, and is not built on a pile of shell scripts. The autotools build system is kept intact for now, in order to ease the migration. The intention is to remove it sooner rather than later, if all goes well. Run `meson build && mesonconf build` to see the configuration options for the new system. Conversion should be straightforward. Environment variables like CFLAGS work the same. If meson is used, xorg-util-macros is not required. In terms of functionality the two systems have about the same capabilities. Here are some differences I noticed: - Meson uses `-g` by default, autotools uses `-g -O2`. - In autotools the default behavior is to install both static and shared versions of the libraries. In meson the user must choose exactly one (using -Ddefault_library=static/shared). It is possible to workaround if needed (install twice...), but hopefully meson will add the option in the future. - Autotools has builtin ctags/cscope targets, meson doesn't. Easy to run the tools directly. - Meson has builtin benchmarks target. Handy. - Meson has builtin support for sanitizers/clang-analyzer/lto/pgo/ coverage etc. Also handy. Signed-off-by: Ran Benita <ran234@gmail.com>
| * build: remove Android.mkRan Benita2017-07-312-62/+0
| | | | | | | | | | | | | | I don't think it will work with meson, and I also don't think anyone is using it. Signed-off-by: Ran Benita <ran234@gmail.com>
| * build: remove -uninstalled pkg-config filesRan Benita2017-07-313-20/+0
|/ | | | | | | Meson doesn't support them directly, and I don't think anyone is using them. Signed-off-by: Ran Benita <ran234@gmail.com>
* travis: do the build out-of-treeRan Benita2017-07-311-1/+2
| | | | | | To catch problems like the previous commit. Signed-off-by: Ran Benita <ran234@gmail.com>
* build: fix out-of-tree buildRan Benita2017-07-312-3/+4
| | | | | | | | | | | | The change in d44ba48 removed -I$(top_builddir)/src/xkbcomp, but this is needed in order to find the generated parser.h file which is put in the build dir. I also added -I$(top_builddir)/src in order to match the meson behavior. Fixes https://github.com/xkbcommon/libxkbcommon/issues/50 Signed-off-by: Ran Benita <ran234@gmail.com>
* build: use top_srcdir consistentlyRan Benita2017-07-313-4/+4
| | | | Signed-off-by: Ran Benita <ran234@gmail.com>
* build: change doxygen target to be properly dependency-basedRan Benita2017-07-313-19/+21
| | | | | | | This hackery (thanks libinput) is clearer and more precise than the previous hackery. Signed-off-by: Ran Benita <ran234@gmail.com>
* build: move custom targets to scripts/ and remove from makefileRan Benita2017-07-316-18/+15
| | | | | | | These scripts generate source code that is committed to git and hence do not really belong in the build system. A maintainer runs them as needed. Signed-off-by: Ran Benita <ran234@gmail.com>
* build: rewrite the update-keysyms sed script in pythonRan Benita2017-07-313-20/+45
| | | | | | | | | A bit more manageable this way, and the other part of the target is already using python. The output is the same, except I removed the reference to Makefile.am. Signed-off-by: Ran Benita <ran234@gmail.com>
* build: remove unneeded preprocessor include flagsRan Benita2017-07-314-9/+7
| | | | | | Better to avoid these unexpected include paths. Signed-off-by: Ran Benita <ran234@gmail.com>
* build: explain why we don't AC_DEFINE a couple of constantsRan Benita2017-07-311-0/+2
| | | | Signed-off-by: Ran Benita <ran234@gmail.com>
* x11/keymap,test/interactive-evdev: fix a couple of clang-analyzer warningsRan Benita2017-07-312-0/+2
| | | | | | | From my analysis these values cannot be null, but the analyzer cannot see this. So assert it. Signed-off-by: Ran Benita <ran234@gmail.com>
* test/x11comp: fix compiler warningsRan Benita2017-07-311-5/+6
| | | | Signed-off-by: Ran Benita <ran234@gmail.com>
* Merge pull request #48 from namandixit/patch-1Ran Benita2017-05-271-1/+1
|\ | | | | Fixed a minor bug in error detection in Wayland test
| * Fixed a minor bug in error detection in Wayland testNaman Dixit2017-05-271-1/+1
|/
* Merge pull request #46 from jwrdegoede/masterRan Benita2017-05-122-416/+420
|\ | | | | Sync Keysyms with recent xproto additions
| * Sync Keysyms with recent xproto additionsHans de Goede2017-05-122-416/+420
|/ | | | | | | | | | | | | xproto recently has been extended with 4 new keysyms: XF86XK_Keyboard XF86XK_WWAN XF86XK_RFKill XF86XK_AudioPreset This commit is the result of running "make update-keysyms" on a system with the updated xproto installed. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* doc/compat: correct the XKB protocol version from 1.1 to 1.0Ran Benita2017-04-291-1/+1
| | | | | | | | There is no XKB 1.1! Thanks to Oded Arbel for catching this. Signed-off-by: Ran Benita <ran234@gmail.com>
* test/interactive-x11: handle NULL from xcb_wait_for_eventRan Benita2017-04-281-0/+4
| | | | | | | | Can happen in cases like: - There was an error between the error check and the call. - The internal poll() fails. Signed-off-by: Ran Benita <ran234@gmail.com>
* state: cure boolean blindness in the filter functions' resultRan Benita2017-04-271-24/+41
| | | | | | Makes it a little easier to understand the filters. Signed-off-by: Ran Benita <ran234@gmail.com>
* state: remove unneeded NULL checkRan Benita2017-04-271-3/+0
| | | | | | xkb_filter_new() cannot return NULL. Signed-off-by: Ran Benita <ran234@gmail.com>
* state: reorder new() functions before the set() functions in the codeRan Benita2017-04-271-28/+28
| | | | | | So that they may be read more naturally in chronological order. Signed-off-by: Ran Benita <ran234@gmail.com>
* test/x11comp: be a bit more careful with kill()Ran Benita2017-04-111-2/+3
| | | | | | We did it correctly but better be safe and appease clang. Signed-off-by: Ran Benita <ran234@gmail.com>
* test/interactive-wayland: mark a local function staticRan Benita2017-04-111-1/+1
| | | | Signed-off-by: Ran Benita <ran234@gmail.com>
* test/interactive-wayland: handle unrecognized SHM formatRan Benita2017-04-111-0/+3
| | | | | | | | The enum seems large, and we don't handle all of the values in it. Previously if we got an unrecognized SHM format we would use an uninitialized `stride`. Signed-off-by: Ran Benita <ran234@gmail.com>
* test/interactive-wayland: fix uninitialized `ret` in error pathRan Benita2017-04-111-0/+1
| | | | Signed-off-by: Ran Benita <ran234@gmail.com>
* Merge pull request #45 from fooishbar/xdg-shell-v6Ran Benita2017-04-116-41/+53
|\ | | | | Wayland: xdg-shell v6 support