summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * interactive-wayland: Port to xdg-shell v6Daniel Stone2017-04-114-40/+51
| | | | | | | | | | | | | | 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>
| * Add explicit fallthrough case statementsDaniel Stone2017-04-112-1/+2
|/ | | | | | | 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>
* Bump version to 0.7.1xkbcommon-0.7.1Ran Benita2017-01-181-1/+1
| | | | Signed-off-by: Ran Benita <ran234@gmail.com>
* Update NEWSRan Benita2017-01-181-0/+14
| | | | Signed-off-by: Ran Benita <ran234@gmail.com>
* compose/doc: note that it is safe to pass the result of getenv() as localeRan Benita2017-01-151-1/+5
| | | | | | | 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>
* compose: remove the keysym_from_name cacheRan Benita2016-12-031-45/+3
| | | | | | | | | | 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>
* doc: note that XKB_KEYSYM_CASE_INSENSITIVE does C folding onlyRan Benita2016-12-031-0/+3
| | | | | | and not locale-dependent. Signed-off-by: Ran Benita <ran234@gmail.com>
* keysym: fix locale dependence in xkb_keysym_from_name()Ran Benita2016-12-025-13/+90
| | | | | | | | | | | | | | | | | | | | | | | 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>
* utils: rename popcount to avoid conflict in NetBSDRan Benita2016-11-142-2/+3
| | | | | Resolves https://github.com/xkbcommon/libxkbcommon/issues/41 Signed-off-by: Ran Benita <ran234@gmail.com>
* Bump version to 0.7.0xkbcommon-0.7.0Ran Benita2016-11-111-1/+1
| | | | Signed-off-by: Ran Benita <ran234@gmail.com>
* Update NEWSRan Benita2016-11-111-1/+24
| | | | Signed-off-by: Ran Benita <ran234@gmail.com>
* Merge pull request #31 from bluetech/consumed-modesRan Benita2016-10-3111-57/+238
|\ | | | | Consumed modifiers modes
| * state: add GTK consumed modifiers modeRan Benita2016-10-314-4/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * state: allow different modes for calculating consumed modifiersRan Benita2016-10-318-55/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * utils: add popcount functionRan Benita2016-10-222-0/+14
|/ | | | Signed-off-by: Ran Benita <ran234@gmail.com>
* test/state: move wrongly-placed assertRan Benita2016-10-221-2/+1
| | | | Signed-off-by: Ran Benita <ran234@gmail.com>
* bench: fix compilation on hurdRan Benita2016-09-192-0/+3
| | | | | | | | Patch by Samuel Thibault. https://github.com/xkbcommon/libxkbcommon/issues/39 Signed-off-by: Ran Benita <ran234@gmail.com>
* bench/compose: tabs -> spacesRan Benita2016-09-161-4/+4
| | | | Signed-off-by: Ran Benita <ran234@gmail.com>
* README: Add basic build directionsBryce Harrington2016-09-161-0/+15
| | | | | | | | | | | | | | | | | | 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>
* README: Bug *reports* are welcomeBryce Harrington2016-09-161-1/+1
| | | | | | Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Yong Bakos <ybakos@humanoriented.com> Signed-off-by: Ran Benita <ran234@gmail.com>
* bench: Check for errors opening Compose fileBryce Harrington2016-09-161-0/+6
| | | | | | | | 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>
* doc/compat: (! MODIFIER) syntax is parsed but ignoredRan Benita2016-09-011-0/+1
| | | | Signed-off-by: Ran Benita <ran234@gmail.com>
* doc/compat.md: xkbcomp ignores multiple-keysyms these daysRan Benita2016-09-011-2/+1
| | | | | | https://cgit.freedesktop.org/xorg/app/xkbcomp/commit/?id=e119cbec7e750ffc4d4bd08b577db2c697035a30 Signed-off-by: Ran Benita <ran234@gmail.com>
* doc: Also mention the wayland test client in the quick guideBryce Harrington2016-06-211-0/+2
| | | | Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
* doc: Declare keymap for wayland exampleBryce Harrington2016-06-211-0/+1
| | | | | | | 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>
* doc: Fix ctx type in exampleBryce Harrington2016-06-211-1/+1
| | | | | | | 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>
* PACKAGING: Update for interactive-waylandDaniel Stone2016-06-211-0/+5
| | | | Signed-off-by: Daniel Stone <daniels@collabora.com>
* test/interactive-wayland: fix control reaches end of non-void functionRan Benita2016-06-091-6/+2
| | | | | | | AFAICS there is nothing that can fail directly in this function, so change it to void. Signed-off-by: Ran Benita <ran234@gmail.com>
* keymap-dump: use consistent order set/latch/lock (style)Ran Benita2016-06-091-1/+1
| | | | Signed-off-by: Ran Benita <ran234@gmail.com>
* src/state: match_mod_masks can return bool instead of intRan Benita2016-06-091-6/+4
| | | | Signed-off-by: Ran Benita <ran234@gmail.com>
* test/symbols-leak-test: use more portable shebangRan Benita2016-06-091-1/+1
| | | | | | | 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>
* test/interactive-wayland: don't ignore asprintf return valueRan Benita2016-05-051-2/+4
| | | | | | Fixes warn_unused_result warning. Signed-off-by: Ran Benita <ran234@gmail.com>
* test: use termios instead of system() for disabling terminal echoRan Benita2016-05-055-12/+35
| | | | | | | 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>
* gitignore: ignore generated wayland protocol stubsRan Benita2016-04-191-0/+2
| | | | Signed-off-by: Ran Benita <ran234@gmail.com>
* interactive-wayland: Valgrind-proofingDaniel Stone2016-04-121-8/+23
| | | | | | | | | | | 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>
* test: Add interactive-waylandDaniel Stone2016-04-125-1/+738
| | | | | | | | | | 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>
* Bump version to 0.6.1xkbcommon-0.6.1Daniel Stone2016-04-082-1/+9
| | | | | | Our most minor release yet. Signed-off-by: Daniel Stone <daniels@collabora.com>
* Add LICENSE to distributed filesDaniel Stone2016-03-311-0/+1
| | | | Signed-off-by: Daniel Stone <daniels@collabora.com>
* doc: update reference to compat symbol to its new nameRan Benita2016-03-261-1/+1
| | | | Signed-off-by: Ran Benita <ran234@gmail.com>
* Bump version to 0.6.0xkbcommon-0.6.0Ran Benita2016-03-162-2/+2
| | | | Signed-off-by: Ran Benita <ran234@gmail.com>
* test: assert/ignore some warn_unused_result'sRan Benita2016-03-153-9/+12
| | | | Signed-off-by: Ran Benita <ran234@gmail.com>
* Merge pull request #33 from bluetech/travis-enable-x11Ran Benita2016-03-151-3/+4
|\ | | | | travis: remove --disable-x11
| * travis: remove --disable-x11Ran Benita2016-03-151-3/+4
|/ | | | | | | 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>
* Merge pull request #32 from fooishbar/masterRan Benita2016-03-153-11/+11
|\ | | | | doc: Fix Doxygen include for srcdir != builddir
| * travis: Enable documentation buildDaniel Stone2016-03-151-1/+1
| | | | | | | | | | | | Make sure Doxygen is installed before we build. Signed-off-by: Daniel Stone <daniels@collabora.com>
| * doc: Fix Doxygen include for srcdir != builddirDaniel Stone2016-03-152-10/+10
|/ | | | | | | | | | | | | | | 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>
* Update NEWSRan Benita2016-03-131-0/+23
| | | | Signed-off-by: Ran Benita <ran234@gmail.com>
* NEWS: add some spacingRan Benita2016-03-131-0/+4
| | | | Signed-off-by: Ran Benita <ran234@gmail.com>
* build: don't run test/x11comp in make check for nowRan Benita2016-03-131-2/+4
| | | | | | | | | 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>
* test/x11comp: fix memory leakRan Benita2016-03-131-1/+2
| | | | Signed-off-by: Ran Benita <ran234@gmail.com>