Daniel Stone
3d31be5f87
Also print group name in keysym error
...
Unfortunately we can't get the actual file it was defined in this far
down, but at least give the human-readable name rather than just a group
index.
Also, groups are not zero-indexed, such that index 0 is group 1; fix
that too.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-16 14:29:40 +00:00
Daniel Stone
7dbd304021
More useful errors for invalid keysyms
...
Instead of generating a fairly droll internal error, generate a warning
also telling us exactly where the bad definition was.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-16 14:22:04 +00:00
Daniel Stone
f40e0790f2
Fix non-useModMapMods action masks
...
By ensuring their mask is only the vmods, rather than also potentially
including the key's modmap. Also remove the unnecessary vmodmask
indirection.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-16 13:59:24 +00:00
Daniel Stone
9452165837
Plug leaks in geometry parsing
...
When parsing a geometry file, don't leak the elements we've created.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-15 09:44:55 +00:00
Daniel Stone
937d40492c
Remove more float support
...
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-15 09:33:56 +00:00
Daniel Stone
3560bf7bf4
Also update vmod -> indicator maps
...
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-15 08:36:09 +00:00
Daniel Stone
0e0b5b00af
Update modifiers after building keymap
...
The server used to have to go and do this on our own, but we can do
better than that: after we've compiled the keymap, go through and bind
virtual modifiers to everything that needs it.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-14 18:24:37 +00:00
Daniel Stone
62444a117c
Convert interp action from xkb_any_action to xkb_action
...
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-14 17:06:09 +00:00
Daniel Stone
3d38da0c5b
Fix leak in xkbcomp.c
...
Accidentally regressed this one briefly, oops.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-14 17:04:36 +00:00
Daniel Stone
54aa839c0e
Remove component listing code
...
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-14 12:00:54 +00:00
Daniel Stone
9dde0f3371
Revert "Use XKB_COMMON_* modifier defines in ExprResolveModMask"
...
Because indices and masks are not at all the same thing.
This reverts commit 645275406f
.
2012-03-13 12:46:37 +00:00
Daniel Stone
645275406f
Use XKB_COMMON_* modifier defines in ExprResolveModMask
...
Rather than the ones from XKB.h.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-10 14:42:30 +00:00
Daniel Stone
f9b3a14e08
Remove overlay support as well
...
Right now we just silently ignore overlay controls, which is probably
bad, but it's not the easiest to fix.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-10 14:36:30 +00:00
Daniel Stone
24c61d0f78
Remove half-implemented radio groups
...
It looks like this could never have worked anyway, what with num_rg
always being 0 everywhere. Remove it.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-10 14:27:06 +00:00
Daniel Stone
671ab1bf8f
Handle XkbFiles without a name
...
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-10 13:54:03 +00:00
Daniel Stone
c8fd3ea4b6
Move allocation of xkb_desc into CompileKeymap
...
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-10 13:48:13 +00:00
Daniel Stone
17bcc4c163
Remove geometry even harder
...
Not the most elegant fix, but will do for now.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-09 19:30:31 +00:00
Daniel Stone
a0e756fd83
Introduce xkb_atom_t type
...
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-09 19:30:31 +00:00
Daniel Stone
0bb24c2d23
Introduce xkb_keysym_t type
...
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-09 19:30:31 +00:00
Daniel Stone
731e5c40bc
Stringify public name types
...
Ensure that all names under xkb_desc are strings, rather than atoms.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-09 19:30:31 +00:00
Daniel Stone
57b551a418
Ensure we always have a complete keymap
...
Refuse to compile without keycodes + compat + types + symbols.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-09 19:30:31 +00:00
Daniel Stone
4bc451bf08
Convert CompileKeymap to early-return style
...
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-09 19:30:30 +00:00
Daniel Stone
59e03bf5f2
Use compile_keymap in xkb_compile_keymap_from_components
...
We already had this exact function sitting right next to us, so use it
rather than open-coding.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-09 19:30:30 +00:00
Daniel Stone
73919568b0
Add explicit braces
...
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-09 19:30:30 +00:00
Daniel Stone
aa41ab2918
xkbcomp: Turn an array into an anonymous struct
...
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-09 19:30:30 +00:00
Daniel Stone
ed5c6c1796
Remove geometry support, again
...
It still parses geometry, but happily throws it away.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-09 19:30:30 +00:00
Daniel Stone
b28823cc59
Remove KcCGST names from the map
...
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-09 16:04:00 +00:00
Daniel Stone
ed18e65eac
Merge remote-tracking branch 'ran/fixes-cont'
...
Conflicts:
src/xkbcomp/expr.c
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-05 15:07:28 +00:00
Daniel Stone
65e1ff2f0a
Merge remote-tracking branch 'ran/fixes'
2012-03-05 15:00:39 +00:00
Ran Benita
e4b4d6b051
Fix "Could not resolve keysym" errors
...
On many layouts, the following error appears:
Internal error: Could not resolve keysym 10005b0
(Which is like the trademark of libxkbcommon now, and makes
unicode-heavy symbol files pretty useless).
This occurs when a keysym string (in this case, 10005b0) is passed to
xkb_string_to_keysym, but cannot be resolved.
This in turn happens because the parser passes on hexadecimal keysym
strings without the leading "0x", thus leaving the resolving function
without a way to disambiguate it as a number.
Therefore, make sure to pass on the "0x". The file symbols.c in xkbcomp
project does the same; it probably got lost in translation.
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-03-04 00:04:04 +02:00
Ran Benita
2473444f92
Refactor XkbFindFileInPath
...
Also fixes a bug, where the check (typeLen < 1) should have been
(pathLen < 1).
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-03-04 00:04:04 +02:00
Ran Benita
19e99bb27a
Free all atoms along with keymap
...
The code to do this is taken from xserver, dix/atom.c.
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-03-04 00:04:04 +02:00
Ran Benita
d94d9b4522
Free IncludePath when no longer needed
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-03-04 00:04:04 +02:00
Ran Benita
1e6f956e36
Free scanFile when no longer needed
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-03-04 00:04:04 +02:00
Ran Benita
e4447f8131
Fix other misc leaks
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-03-04 00:04:04 +02:00
Ran Benita
30d88b93e7
Don't leak the scanner's buffer
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-03-04 00:04:04 +02:00
Ran Benita
c24d97e45e
Don't leak DoodadInfo's from GeometryInfo
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-03-04 00:04:04 +02:00
Ran Benita
c800c60ace
Don't leak ActionInfo's
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-03-04 00:04:04 +02:00
Ran Benita
d67e73bdbd
Don't leak KeyNamesInfo
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-03-04 00:04:04 +02:00
Ran Benita
5c40bee62a
Don't leak the "minimum"/"maximum" string
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-03-04 00:04:04 +02:00
Ran Benita
c50c87bca2
Don't leak the various *Info's names when overriding them
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-03-04 00:04:04 +02:00
Ran Benita
889a299e3b
Free XkbFile's when no longer needed
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-03-04 00:04:04 +02:00
Ran Benita
c357a11aa6
Add function to free XkbFile's
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-03-04 00:04:04 +02:00
Ran Benita
3216ecc07f
Don't cache loaded rules files
...
This needlessly occupies memory for the lifetime of the library, and
does not make a noticeable difference otherwise.
This rules file won't be loaded more than once in most cases anyway, so
just load it again when it happens.
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-03-04 00:02:14 +02:00
Ran Benita
ca9829ea66
Don't cache parsed files
...
This needlessly occupies memory for the lifetime of the library, and
does not make a noticeable difference otherwise.
Instead, just parse the same file again when it happens.
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-03-03 23:59:43 +02:00
Ran Benita
a64e970809
Remove unneeded freeing mechanisms
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-03-03 01:17:57 +02:00
Ran Benita
c7bf368780
Make the sections array local to the keymap compiling function
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-03-03 01:17:57 +02:00
Ran Benita
baf6a677dc
Remove unused global type tokens
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-03-03 01:17:57 +02:00
Ran Benita
f549ce078f
Use global tables for action string handling
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-03-03 01:17:57 +02:00
Ran Benita
d2c3dd0c21
Constify some more text functions
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-03-03 01:17:57 +02:00