Branch :
| Author | Commit | Date | CI | Message |
|---|---|---|---|---|
| b4b40d73 | 2012-09-12 16:54:07 | Copyright updates With Dan Nicholson's permission (via email), update his copyright and license statements to the standard X.Org boilerplate MIT license, as both myself and Ran have been using. Clean up my copyright declarations (in some cases to correct ownership), and add copyright/license statements from myself and/or Ran where appropriate. Signed-off-by: Daniel Stone <daniel@fooishbar.org> | ||
| 14cd8c79 | 2012-09-11 17:00:38 | utils: Replace DEC copyright with Ran's This is not something I do often, but I have good reason here ... utils.h has been totally rewritten since import, and now contains no original DEC content. Everything in here has been added by Ran, and I do not believe that any lingering content from previous iterations is substantial enough as to be copyrightable. Replace DEC's copyright (and license with hostile advertising clause) with Ran's boilerplate copyright and license statement. Signed-off-by: Daniel Stone <daniel@fooishbar.org> | ||
| 82de180e | 2012-09-11 15:09:37 | Remove unused ExprResolveKeyName The only user was removed in 314965b1. Signed-off-by: Daniel Stone <daniel@fooishbar.org> | ||
| 14741800 | 2012-09-11 14:52:27 | Constify keysym <-> Unicode lookup table Before: text data bss dec hex filename 234422 11288 2304 248014 3c8ce obj-amd64/.libs/libxkbcommon.so.0.0.0 After: text data bss dec hex filename 240694 5016 2304 248014 3c8ce obj-amd64/.libs/libxkbcommon.so.0.0.0 Signed-off-by: Daniel Stone <daniel@fooishbar.org> | ||
| 28bd10ce | 2012-09-11 14:10:41 | kbproto unentanglement: drop dependency \o\ \o/ /o/ Signed-off-by: Daniel Stone <daniel@fooishbar.org> | ||
| fa1ea9a5 | 2012-09-11 14:09:20 | kbproto unentanglement: XkbGeomPtsPerMM Signed-off-by: Daniel Stone <daniel@fooishbar.org> | ||
| e60e9523 | 2012-09-11 12:35:24 | kbproto unentanglement: XkbExplicit*Mask Signed-off-by: Daniel Stone <daniel@fooishbar.org> | ||
| 2eab7efc | 2012-09-11 12:32:18 | kbproto unentanglement: XkbSI_AutoRepeat That was the only interp flag, so just turn it into a straight boolean. Signed-off-by: Daniel Stone <daniel@fooishbar.org> | ||
| a8d462e3 | 2012-09-11 12:28:29 | kbproto unentanglement: XkbSI match flags Signed-off-by: Daniel Stone <daniel@fooishbar.org> | ||
| ed9fd5be | 2012-09-11 12:20:21 | kbproto unentanglement: control actions Signed-off-by: Daniel Stone <daniel@fooishbar.org> | ||
| 6573aca0 | 2012-09-10 21:05:04 | kbproto unentanglement: XkbMaxShiftLevel ... by removing its only use. Signed-off-by: Daniel Stone <daniel@fooishbar.org> | ||
| 32bf4053 | 2012-09-10 20:44:52 | kbproto unentanglement: Xkb{Wrap,Clamp,Redirect}IntoRange Signed-off-by: Daniel Stone <daniel@fooishbar.org> | ||
| 461f8a76 | 2012-09-10 20:40:05 | actions: Remove PointerDefault affect field This was always set to affect the default button, so no need for it. Signed-off-by: Daniel Stone <daniel@fooishbar.org> | ||
| 70c775f6 | 2012-09-10 20:38:46 | kbproto unentanglement: action flags Signed-off-by: Daniel Stone <daniel@fooishbar.org> | ||
| b6e04571 | 2012-09-10 20:16:05 | kbproto unentanglement: XkbLC_* Signed-off-by: Daniel Stone <daniel@fooishbar.org> | ||
| 830fe671 | 2012-09-10 20:07:54 | kbproto unentanglement: XkbIM_* Signed-off-by: Daniel Stone <daniel@fooishbar.org> | ||
| 0b2506db | 2012-09-10 19:23:16 | kbproto unentanglement: action types Signed-off-by: Daniel Stone <daniel@fooishbar.org> | ||
| 314965b1 | 2012-08-21 14:40:51 | Remove deprecated actions We didn't do anything with ISO_Lock, ActionMessage, RedirectKey, and the device-specifying variants of the pointer actions, so remove those. Signed-off-by: Daniel Stone <daniel@fooishbar.org> | ||
| b04d896a | 2012-08-21 12:48:20 | kbproto unentanglement: XkbNumVirtualMods Signed-off-by: Daniel Stone <daniel@fooishbar.org> | ||
| 74ec4c1c | 2012-08-21 12:47:28 | kbproto unentanglement: XkbNumIndicators Signed-off-by: Daniel Stone <daniel@fooishbar.org> | ||
| 4b8ceae9 | 2012-08-21 12:45:03 | kbproto untanglement: XkbKbdNumGroups Signed-off-by: Daniel Stone <daniel@fooishbar.org> | ||
| f5dffd2b | 2012-08-21 11:21:19 | kbproto untanglement: XkbKeyNameLength Define it ourselves as XKB_KEY_NAME_LENGTH and use that, instead of the one from XKB.h. Signed-off-by: Daniel Stone <daniel@fooishbar.org> | ||
| 3b6b214c | 2012-08-28 18:04:25 | rules: use goto instead of state variable There's no noticeable speed difference, but I think it's nicer and more explicit than the previous code. Some people just don't like goto, though.. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 0071227e | 2012-08-26 08:54:31 | rules: rewrite Rewrite the rules file parser for clarity, performance and memory usage reduction. The previous implementation was quite hard to navigate and did a lot of unnecessary work and copying. This implementation keeps along just the state necessary, and doesn't perform any copying of the file's content (although the entire file is mmap'ed as before). Hopefully it's also easier to understand, has better documentation, and better error checking and reporting. We try to reproduce the previous behavior in every case. Note: the diff is pretty confusing; it's likely better to look at the file directly. Benchmarks: On an old 32-bit Intel processor. gcc -O2 -pg ./test/rulescomp bench grof test/rulescomp Before: compiled 1000 keymaps in 14.863564304s % cumulative self self total time seconds seconds calls ms/call ms/call name 49.33 4.43 4.43 30610000 0.00 0.00 yylex 17.93 6.04 1.61 31000 0.05 0.22 yyparse 6.57 6.63 0.59 1000 0.59 0.59 load_rules 3.23 6.92 0.29 3637000 0.00 0.00 AppendStmt 2.45 7.14 0.22 472000 0.00 0.00 AddKeySymbols 2.12 7.33 0.19 3591000 0.00 0.00 atom_intern 2.12 7.52 0.19 518000 0.00 0.00 FindNamedKey 2.00 7.70 0.18 230000 0.00 0.00 FreeStmt 1.78 7.86 0.16 1000 0.16 0.17 UpdateModifiersFromCompat 1.34 7.98 0.12 732000 0.00 0.00 AddKeyName 1.34 8.10 0.12 __x86.get_pc_thunk.bx After: compiled 1000 keymaps in 13.874666269s % cumulative self self total time seconds seconds calls ms/call ms/call name 49.82 4.26 4.26 30610000 0.00 0.00 yylex 22.22 6.16 1.90 31000 0.06 0.22 yyparse 2.92 6.41 0.25 3591000 0.00 0.00 atom_intern 2.57 6.63 0.22 1000 0.22 0.25 xkb_components_from_rules 2.11 6.81 0.18 3637000 0.00 0.00 AppendStmt 2.11 6.99 0.18 230000 0.00 0.00 FreeStmt 1.99 7.16 0.17 518000 0.00 0.00 FindNamedKey 1.99 7.33 0.17 1000 0.17 0.17 UpdateModifiersFromCompat 1.99 7.50 0.17 __x86.get_pc_thunk.bx 1.52 7.63 0.13 150000 0.00 0.00 AddInterp 1.40 7.75 0.12 472000 0.00 0.00 AddKeySymbols On a newer 64-bit Intel processor. gcc -O2 ./test/rules-file bench Before: processed 20000 times in 15.940546625s After: processed 20000 times in 5.295026345s Allocations: gcc -O2 valgrind test/rulescomp Before: total heap usage: 257,519 allocs, 257,519 frees, 14,766,529 bytes allocated After: total heap usage: 240,756 allocs, 240,756 frees, 14,007,886 bytes allocated Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 54d1d5ed | 2012-09-04 17:40:09 | compat: make LEDInfo a wrapper around xkb_indicator_map instead of duplicating the fields. The same is done in SymInterpInfo which wraps xkb_sym_interpret. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 5f613988 | 2012-09-04 17:20:46 | Fold keymap->indicator_names into keymap->indicators This makes sense, since giving a name to an indicator 'activates' the indicator_map in that index. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 7ae0c6ba | 2012-08-31 19:26:51 | Convert rest of names in xkb_keymap back to atoms These were kept as atoms, but since the keymap was exposed in the API, we converted them to strings; no the keymap is no longer exposed, so we can go back to atoms. They make the keymap smaller (at least on 64-bit machines) and the comparisons faster. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 1a996883 | 2012-08-31 19:05:49 | expr: make ResolveString return an atom Almost all callers do xkb_atom_intern on the currently returned string, while ResolveString converts the atom to the string to begin with... uselss double work. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 7aa31097 | 2012-08-31 18:52:26 | atom: add xkb_atom_lookup This will only lookup the string and return the atom if found; it will not intern it if not. This is useful when e.g. getting a string from the user (which may be arbitrary) and comparing against atoms. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 651e1dab | 2012-08-31 18:47:28 | atom: separate lookup logic from atom_intern This would allow us to add a non-interning xkb_atom_lookup function. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| f205d0f9 | 2012-08-31 18:22:03 | atom: make type and name of the 'a' field clearer Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| af2a8b3a | 2012-09-02 21:45:42 | Unify some string tables from xkbcomp, text and keymap-dump We move the LookupEntry struct from expr.h to text.h, along with most of the lookup tables. This makes them available everywhere. Looking up a value in the LookupEntry format is slower than direct index mapping, but it allows multiple names per value (with the canonical one being first) and "all"- and "none"-type masks. These functions are not used anywhere efficiency matters. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 7f04ffc4 | 2012-08-29 12:10:28 | rules: fix check for appending '|' character when applying There are two ways to separate multiple files in XKB include statements: '+' will cause the later file to override the first in case of conflict, while '|' will cause it augment it (this is done by xkbcomp). '!' is unrelated here. Since '|' is practically never used, this wasn't noticed. In the modified test, the '|some_compat' previously was just ignored. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 41472822 | 2012-08-29 15:17:00 | Use XKB_MOD_INVALID instead of XkbNoModifier Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 300f3fb1 | 2012-08-29 10:12:56 | Don't printf NULL strings Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| bce90d5b | 2012-08-29 10:06:47 | xkbcomp: add debug messages of the RMLVO and KcCGST Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 8e6fce9b | 2012-08-29 00:44:58 | include: document ParseIncludeMap better The format of the include statment is not explained anywhere, the code is confusing and the comments misleading. Try to explain it better. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 799cc064 | 2012-08-28 15:05:01 | include: properly use the default map if none is found For some reason this piece of code wasn't copied from xkbcomp, which causes all of the warnings like these: Warning: No map in include statement, but "pc" contains several; Using first defined map, "pc105" Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 8d7d9792 | 2012-08-28 00:42:59 | log: replace "priority" by "level" everywhere Now that we don't use syslog, "level" does sound more commonplace. We should change it while there is still nobody using it. Also leave some space between the integers of the xkb_log_level enum values, if we ever need to shove more in between. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 95d4fb9e | 2012-09-03 10:28:58 | action: fix LookupEntry for "lockdevbtn" xkbcomp has that bug as well, guess no one uses it. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 7e0c49e0 | 2012-09-02 16:33:02 | action: remove redundant check The NoAction handler always errors out with the same message. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 87bfd973 | 2012-09-02 11:29:31 | action: keep array of default actions, instead of list of changes The implementation of changing the default properties of actions, e.g. a statements such as (from test/data/compat/basic): setMods.clearLocks= True; latchMods.clearLocks= True; latchMods.latchToLock= True; works by keeping a list of ActionInfo's, each containing the neccesary info from each statement, and then when some action comes up (e.g. in an interpret statment) it goes through the list, and applies the relevent ActionInfo's to the newly-constructed xkb_action. Instead of doing this, we add a struct ActionsInfo, which contains an array of xkb_actions, one for each type. When a default changing statement appears, we change the action in the array; when a new action comes up, we just copy from the array. This is simpler to figure out, and pretty straightforward. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 4ca85c7b | 2012-09-02 16:16:57 | action: disallow setting an action_field default for all types Currently where it is possible to write: setMods.clearLocks = True; It's also possible to write: action.clearLocks = True; This will set the default value for the clearLocks action field for *all* action types, as opposed to just setMods in this case. If subsequently an action is used for which this field does not make sense, it will error out. This doesn't make any sense, because any given field is only possible by at most 3 or 4 action types... which you might as well write explicitly and avoid the side effect mentioned above. Needless to say this is one of xkbcomp's "hidden features" and is not used anywhere; remove it. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| ba9f66bd | 2012-09-02 10:35:08 | action: clean up formatting of extern functions Make it a bit easier to understand what they do. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 1736e7da | 2012-08-31 12:12:13 | types: don't strdup a default name None of the other files does that. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 149e1b2f | 2012-08-31 12:06:50 | types: use darray for KeyTypesInfo instead of list Simpler, uses less memory and more efficient. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 8654d36e | 2012-08-27 23:00:07 | types: remove outdated comments The code is pretty straightforward now... Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| db639be6 | 2012-09-03 10:23:44 | keymap: optimize FindInterpsForKey a bit Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 872e15e5 | 2012-08-30 00:12:41 | keymap: refactor ApplyInterpsToKey There's really not much to explain what the function used to do there... Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| ae576e85 | 2012-08-30 17:15:39 | state: remove unneeded optimization The code that follows does exactly that. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| a45b7d75 | 2012-08-27 11:51:37 | state: light indicator when either condition is satisfied For the indicator to be set, it is sufficient for at least one of the group, modifier, or control state to match; this is in line with the xkblib spec, section 8.2 and ComputeAutoState() in xserver/xkb/xkbLEDs.c (though the xserver implementation differs from the spec on some points...). This also adds a tiny optimization to skip the entire check if the mask is empty. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| d1b476a3 | 2012-08-27 11:25:23 | state: fix led_update_all group mask calculation The one above uses which_mods, this one should use which_groups. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 9ba5ac0e | 2012-08-27 23:05:04 | keycodes: remove outdated comments Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| bebad402 | 2012-08-31 18:15:01 | keycodes: use darray for aliases instead of list Uses slightly more memory, but worth it. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 518aff6d | 2012-08-31 11:40:35 | keycodes: use array for indicator names instead of list Using a simple array here to mirror keymap->indicator_names makes much more sense, and is simpler. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| be78b826 | 2012-08-31 11:13:24 | keycodes: ignore "virtual" in indicators The distinction between real/virtual indicators is useless for us, we can just ignore it. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 4c56d4d9 | 2012-08-28 14:45:03 | symbols: call deinit functions Clear instead of Free Everywhere else Free is reserved for when the argument is free'd as well. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 2eba51c0 | 2012-08-27 09:37:01 | symbols: remove comparison of unsigned >= 0 clang warning. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 3d305bd0 | 2012-08-30 13:49:23 | vmod: remove outdated comments Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| b3aced7e | 2012-08-28 11:14:54 | vmod: ClearVModInfo doesn't need the keymap Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| ab1566cd | 2012-08-28 11:11:40 | vmod: remove useless keymap initialization keymap->vmods is not touched until UpdateModifiersFromCompat, where it initialized and used. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| f410622b | 2012-08-15 22:07:37 | vmod: remove support for resolving integer to virtual modifier This is only relevant to the virtualModifier= statement in interpret statements in xkb_compat. The current code allows to write e.g. virtualModifier = 4 to get the virtual modifier whose index happens to be 4 (possibly declared in other files or sections, i.e. xkb_types). Doing this is undeterministic, will break without notice, and not used anywhere. Don't allow it. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| d3ddcf70 | 2012-08-15 21:45:02 | expr: move op_type/value_type_to_string functions to ast Generally the enum-to-string function should appear where the enum is defined. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| b9c87eb7 | 2012-08-14 17:11:16 | vmod: remove support for direct vmod -> real mod mapping The current code supports statements such as: virtual_modifiers NumLock = Mod2; This would set the mapping from the NumLock vmod to the Mod2 real mod directly, without going through the virtualModifier field in an interpret statement (in xkb_compat) or vmods field in a key statement (in xkb_symbols). This is undocumented, unused and complicates things, so remove it. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| eaa50c45 | 2012-08-15 10:10:44 | xkbcomp: seperate keymap-copying code from Compile functions Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 8c1b1b0e | 2012-08-29 15:02:40 | Add xkbcomp/keymap.c and move some code there Add CompileKeymap to do most of what compile_keymap_file does now, and move UpdateKeymapFromModifiers along with it from (mostly unrelated) compat.c. Also rename UpdateKeymapFromModifiers to UpdateDerivedKeymapFields, because it does more than update the modifiers. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 591df115 | 2012-08-27 19:20:41 | Move enum xkb_file_type to xkbcomp/ast.h This is a more suitable place for this enum, since it's internal to xkbcomp. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| efc2d741 | 2012-08-27 18:58:36 | xkbcomp: clean up compile_keymap function We make the xkb_file_type enum sequential instead of masks, and then we don't have to repeat the file types several times in the function. Makes the code cleaner. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 82491d5f | 2012-08-30 12:14:29 | map, state: check for KeycodeInRange only in API functions Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 06d7803a | 2012-08-30 12:13:37 | state: fix mod_names_are_active This function was always returning -1. Adding a test, we see that test/state.c treat the is_active functions as returning booleans, which would treat -1 as success, so we test for > 0 instead (most users would probably get this wrong as well...). Also update the documentation for the are_active functions, and add a ATTR_NULL_SENTINEL for gcc __attribute__((sentinel)). Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 9f0c0160 | 2012-08-30 11:21:03 | state: fix type confusion within xkb_state_update_mask idx should be xkb_mod_index_t, while mod is the mask. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 6738d300 | 2012-09-02 19:16:34 | compat: only compute 'bool report' once Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| e5fdbcbb | 2012-09-02 11:49:43 | compat: disallow changing global defaults from within an interpret It's currently possible to write something like this: interpret Num_Lock+Any { virtualModifier = NumLock; action = LockMods(modifiers=NumLock); !indicator.allowExplicit; }; The final statement has the same effect as writing it in the global file scope, which changes the default indicator (which all subsequent indicators start off as). This very strange and also unused; if someone does it he probably expects it to affect only the local scope, and he might then get unexpected behavior. So don't allow it. Also, HandleInterpVar is clearly a misnomer (as it can also change indicator defaults) so rename it. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| c9466b32 | 2012-08-27 22:06:50 | compat: use darray instead of list for interps No need for a list here. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 8c6694fd | 2012-09-02 18:51:26 | compat: remove "flags" field from xkb_indicator_map We don't set this field any more. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 6e676cb7 | 2012-08-30 18:56:24 | compat: ignore "allowExplicit" in indicator statements Using !allowExplicit sets the XkbIM_NoExplicit flag of the indicator, which means that an XKB client cannot change the state of the indicator using e.g. XkbSetNamedIndicator(). We do not support changing the state of an indicator; furthermore doing it is probably only useful in conjunction with led-drives-keyboard behavior, which we also do not support. This is because setting an indicator without led-drives-keyboard would make the indicator and the modifier/group it's bound to to get out of sync. We can re-add this if we need this info. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| d573600d | 2012-08-30 16:39:33 | compat: ignore "ledDrivesKbd" in indicator statements We don't support it, as mentioned in the README, so we should stop processing it and print a message about it. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 9de067aa | 2012-08-27 21:31:18 | compat: ignore "group" (compatibility) statements Group compatibility statements are like the following: group 3 = AltGr; This currently results in: keymap->groups[2].mask = <real mod mapped from AltGr vmod> And we don't do any thing with this value later. The reason it exists in XKB is to support non-XKB clients (i.e. XKB support disabled entirely in the server), which do not know the concept of "group", and use some modifier to distinguish between the first and second keyboard layouts (usually with the AltGr key). We don't care about all of that, so we can forget about it. One artifact of this removal is that xkb_map_num_groups no longer works, because it counted through keymap->groups (this wasn't entirely correct BTW). Instead we add a new num_groups member to the keymap, which just hold the maximum among the xkb_key's num_groups. This also means we don't have to compute anything just to get the number of groups. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 7f75502f | 2012-08-27 13:21:03 | compat: get rid of BindIndicators Now that 1fba6189e67 removed support for binding indicator maps by index instead of name, we can remove some more magic which happens now: if an indicator map specifies an indicator name which was not previously declared in a 'indicator 5 = "Caps Lock"'-like statement in xkb_keycodes, we can just look at the next free index and assign it. This also allows us to use a darray for the LEDInfo's instead of a list. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 02de2a3e | 2012-08-27 12:29:57 | compat: ignore "index" field in indicator statements The current code allows to set the "index" field in an indicator statment's body. This would bind the indicator to the specified index, instead of by name (which was declared previously in xkb_keycodes). Doing this is a bad idea, for the same reasons as in 3cd9704, and is also happily not used anywhere. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 65c4a717 | 2012-08-27 11:38:44 | compat: remove dead NoAutomatic code The xkblib spec, table 7.1 (indicators), says: XkbIM_NoAutomatic: Xkb does not automatically change the value of the indicator based upon a change in the keyboard state, regardless of the values for the other fields of the indicator map. xkbcomp (the real one) never actually implemented a way for an indicator statement to set this flag, so it's just dead unused code. We definitely don't want to implement it ourselves, so remove any mention of it. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 16f2de8b | 2012-08-14 16:26:30 | compat: ignore "locking" field in sym interprets This field is used in conjunction with key behaviors, which we don't support since c1ea23da5. This is also unused in xkeyboard-config. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| e9aa84f3 | 2012-08-14 15:06:11 | compat: small changes Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 4fec91cb | 2012-08-14 15:05:56 | compat: add general overview Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 79a2cc09 | 2012-08-11 11:54:05 | action: convert action field type to enum We can also hide the ActionInfo definition inside action.c. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 8f1ee629 | 2012-08-14 14:42:57 | types: add "Effects on keymap" to overview Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| cdc228ea | 2012-08-13 11:00:43 | Organize xkbcomp/ header files Various non-functional changes: - Re-add keycodes.h and move some stuff there. - Add parser-priv.h for internal bison/flex stuff. - Don't include headers from other headers, such that file dependencies are immediate in each file. - Rename xkbcomp.h -> ast.h, parseutils.{c,h} -> ast-build.{c,h} - Rename path.{c,h} -> include.{c,h} - Rename keytypes.c -> types.c - Make the naming of XkbFile-related functions more consistent. - Move xkb_map_{new,ref,unref} to map.c. - Remove most extern keyword from function declarations, it's just noise (XKB_EXPORT is what's important here). - Append XKBCOMP_ to include guards. - Shuffle some code around to make all of this work. Splitting this would be a headache.. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 3634b156 | 2012-08-14 11:49:19 | Allocate xkb_component_names on stack Instead of malloc'ing it as well. Also improve the error handling. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| e5353528 | 2012-08-13 13:49:17 | Move ISEMPTY to utils.h Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| f491285a | 2012-08-09 16:47:53 | Move 'no symbols defined for ...' message to a warning Shut up shut up shut up shut up shut up shut up. Signed-off-by: Daniel Stone <daniel@fooishbar.org> | ||
| ec2172f3 | 2012-08-10 22:48:18 | Combine a couple of macros Easier to see what it does without the trivial macros. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 4c34bda1 | 2012-08-10 22:38:07 | action: get rid of xkb_any_action And use union xkb_action instead. We add xkb_private_action, which is the same as xkb_any_action, but only used where the intention is clear. This should take care of whatever sizing changes the action struct might have. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 600caac3 | 2012-08-10 22:06:12 | Remove XkbKeyTypeIndex and widen index type We don't need the macro, and using char for the kt_index is imaginably too small. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 87dff888 | 2012-08-10 18:14:35 | Store actions inside struct xkb_key Cuts out a lot of useless redirection and space. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 7bcc5fab | 2012-08-10 13:32:58 | keycodes: save context in Info, not keymap We don't need the keymap in this case, just makes things more verbose. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 0cc5ae33 | 2012-08-10 13:30:44 | Remove xkbcomp/misc.c The KeyName functions are more appropriate in keycodes.c. The ProcessIncludeFile can go to path.c along with the other functions dealing with includes. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| f7c9d749 | 2012-08-10 13:26:36 | Remove left over keycodes.h For some reason we still track this file in git even though we don't use it any more. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 34e690ce | 2012-08-10 13:08:03 | Remove AutoKeyNames feature If this keymap flag is set, whenever a key name appears in one of the sections which does not exist (i.e. has not been declared in keycodes), it finds the first unused keycode and attaches it that name. This might have been useful when you could compile the symbols section or geometry section without a keycodes section, but we don't support this anymore. It's also pretty useless for any real work, because the user has no way of knowing the keycode and so it will never be used. Finally the only obscure way left to set this flag is by including a keycodes file called "computed". Just remove it. Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| ef518a10 | 2012-08-10 10:17:32 | map: share some code Make more extensive use of get_entry_for_key_state, and add key_get_consumed to use in the other consume functions. There's also a slight change in the consumed mods calculations, where we use entry->mods.mask instead of type->mods.mask. The original was copied from what libX11 does but what we do now is more logically correct. The result is exactly the same though because: type->mods.mask ⊇ entry->mods.mask ⊇ entry->preserve.mask Signed-off-by: Ran Benita <ran234@gmail.com> | ||
| 75853ed6 | 2012-08-10 10:11:49 | Use XKB_{GROUP,LEVEL}_INVALID instead of -1 for errors The group/level types are unsigned, so it's odd to return -1 for them. Instead use their invalid values (which happen to be == -1). Signed-off-by: Ran Benita <ran234@gmail.com> |