Commit Graph

1585 Commits (832e32dc6ccab1a310c1b1f8dbde26a0f09aa005)

Author SHA1 Message Date
Bryce Harrington 832e32dc6c 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>
2016-06-21 11:35:21 +10:00
Daniel Stone 07be44abdb PACKAGING: Update for interactive-wayland
Signed-off-by: Daniel Stone <daniels@collabora.com>
2016-06-21 11:35:21 +10:00
Ran Benita 8978ec39ed 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>
2016-06-09 17:23:55 +03:00
Ran Benita 0dd610fbcb keymap-dump: use consistent order set/latch/lock (style)
Signed-off-by: Ran Benita <ran234@gmail.com>
2016-06-09 16:32:32 +03:00
Ran Benita c8e6996ff9 src/state: match_mod_masks can return bool instead of int
Signed-off-by: Ran Benita <ran234@gmail.com>
2016-06-09 15:30:21 +03:00
Ran Benita 81ee012af0 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>
2016-06-09 15:00:43 +03:00
Ran Benita 316c7e2479 test/interactive-wayland: don't ignore asprintf return value
Fixes warn_unused_result warning.

Signed-off-by: Ran Benita <ran234@gmail.com>
2016-05-05 15:43:59 +03:00
Ran Benita fc41d3d605 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>
2016-05-05 15:41:13 +03:00
Ran Benita 0da70c8d3c gitignore: ignore generated wayland protocol stubs
Signed-off-by: Ran Benita <ran234@gmail.com>
2016-04-19 12:40:41 +03:00
Daniel Stone 48d5b44fd0 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>
2016-04-12 13:19:25 +01:00
Daniel Stone 7e123a10b6 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>
2016-04-12 12:15:04 +01:00
Daniel Stone 03f5d36b44 Bump version to 0.6.1
Our most minor release yet.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2016-04-08 10:38:57 +01:00
Daniel Stone bea54b1f7d Add LICENSE to distributed files
Signed-off-by: Daniel Stone <daniels@collabora.com>
2016-03-31 16:43:58 +01:00
Ran Benita b91584a8f3 doc: update reference to compat symbol to its new name
Signed-off-by: Ran Benita <ran234@gmail.com>
2016-03-26 01:56:03 +03:00
Ran Benita 3fee46a218 Bump version to 0.6.0
Signed-off-by: Ran Benita <ran234@gmail.com>
2016-03-16 10:20:49 +02:00
Ran Benita 4c24f7faa8 test: assert/ignore some warn_unused_result's
Signed-off-by: Ran Benita <ran234@gmail.com>
2016-03-15 20:45:05 +02:00
Ran Benita 02628607e0 Merge pull request #33 from bluetech/travis-enable-x11
travis: remove --disable-x11
2016-03-15 20:38:16 +02:00
Ran Benita ba3e6ce7f2 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>
2016-03-15 20:16:29 +02:00
Ran Benita 02e8b26ca0 Merge pull request #32 from fooishbar/master
doc: Fix Doxygen include for srcdir != builddir
2016-03-15 19:53:45 +02:00
Daniel Stone b04344ff63 travis: Enable documentation build
Make sure Doxygen is installed before we build.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2016-03-15 11:34:01 +00:00
Daniel Stone a2974d5f8a 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>
2016-03-15 11:21:29 +00:00
Ran Benita d627549c61 Update NEWS
Signed-off-by: Ran Benita <ran234@gmail.com>
2016-03-13 23:38:40 +02:00
Ran Benita 919b97a837 NEWS: add some spacing
Signed-off-by: Ran Benita <ran234@gmail.com>
2016-03-13 23:33:18 +02:00
Ran Benita 914e84e018 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>
2016-03-13 23:17:23 +02:00
Ran Benita 37ee8e652b test/x11comp: fix memory leak
Signed-off-by: Ran Benita <ran234@gmail.com>
2016-03-13 23:17:23 +02:00
Ran Benita fa1b454328 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>
2016-03-13 23:17:23 +02:00
Ran Benita 1c6d21b45f Add symbol versions forgotten in 0ce17ef3ea
Signed-off-by: Ran Benita <ran234@gmail.com>
2016-03-13 23:17:21 +02:00
Ran Benita 712b39ac7d build: make it easier to add non-built (e.g. script) tests
Signed-off-by: Ran Benita <ran234@gmail.com>
2016-03-13 21:33:03 +02:00
Ran Benita 763e2b7e53 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>
2016-03-13 20:24:44 +02:00
Ran Benita 39082082f6 keymap: share LevelsSameSyms()
The function is generic enough.

Signed-off-by: Ran Benita <ran234@gmail.com>
2016-02-28 00:33:19 +02:00
Ran Benita c8a2564588 state: factor out get_entry_for_mods()
Will be useful later.

Signed-off-by: Ran Benita <ran234@gmail.com>
2016-02-28 00:09:30 +02:00
Ran Benita 9f5139b5ea 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>
2016-02-28 00:09:19 +02:00
Ran Benita c991a7df56 build: fix distcheck
File was renamed in 4266402.

Signed-off-by: Ran Benita <ran234@gmail.com>
2016-01-20 23:30:51 +02:00
Ran Benita e8f04f222a doc: add environment variables index
Signed-off-by: Ran Benita <ran234@gmail.com>
2016-01-20 23:17:42 +02:00
Ran Benita 4aa50c9d88 doc: some notes about key names and aliases
Signed-off-by: Ran Benita <ran234@gmail.com>
2016-01-20 23:17:42 +02:00
Mike Blumenkrantz 0ce17ef3ea 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>
2016-01-20 23:17:10 +02:00
Ran Benita 7f3bb16729 doc/keymap-format-text-v1: add title and intro
Signed-off-by: Ran Benita <ran234@gmail.com>
2015-11-23 00:07:15 +02:00
Ran Benita cf337875c5 doc/quick-guide: small improvements
Signed-off-by: Ran Benita <ran234@gmail.com>
2015-11-21 23:17:55 +02:00
Ran Benita 4266402345 doc/keymap-format-text-v1: convert to markdown
Make it more readable for random browsing.

Signed-off-by: Ran Benita <ran234@gmail.com>
2015-11-21 23:12:18 +02:00
Ran Benita 8891953514 doc/keymap-format-text-v1: update info on preserve
Signed-off-by: Ran Benita <ran234@gmail.com>
2015-11-21 22:51:13 +02:00
Ran Benita 2cca028906 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>
2015-11-19 00:44:27 +02:00
Ran Benita c7e2e6d7b4 keymap: fix outdated comment
See 725ae134d4.

Signed-off-by: Ran Benita <ran234@gmail.com>
2015-10-26 22:16:54 +02:00
Ran Benita 7bb425c14e 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>
2015-09-08 17:28:42 +03:00
Ran Benita 7a15c0efcc doc/Doxyfile: only keep non-default values
Signed-off-by: Ran Benita <ran234@gmail.com>
2015-09-08 09:21:32 +03:00
Ran Benita 8c0d6c7960 doc/Doxyfile: sync with latest version
Signed-off-by: Ran Benita <ran234@gmail.com>
2015-09-08 09:17:16 +03:00
Ran Benita 13d232592e 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>
2015-09-07 14:45:09 +03:00
Ran Benita 6ee503261b Merge pull request #27 from nuko8/osx_test_progs
Modifications to make 'make check' test complete for Mac OS X
2015-08-28 14:20:20 +03:00
Kazunobu Kuriyama 3c12d671cc 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.
2015-08-28 20:02:26 +09:00
Kazunobu Kuriyama 91a19905b3 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.
2015-08-28 19:37:09 +09:00
Ran Benita 74f85d0540 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>
2015-08-23 23:16:37 +03:00