keybindings: Rewrite the modmap code so that it uses libxkbcommon

This removes our Xwayland dependency in the native path. The direct
grabs are still there for the X11 backend and are a bit disgusting,
but that's OK. We can refactor it out later.

This introduces some pretty lousy hackery because it depends on
https://github.com/xkbcommon/libxkbcommon/pull/10 , and I really
don't want to wait on that to squash this dep.
This commit is contained in:
Jasper St. Pierre
2014-08-15 16:23:15 -04:00
parent 04ddfe0a6f
commit 3645c63c08
5 changed files with 175 additions and 71 deletions

View File

@ -29,6 +29,7 @@
#include <gio/gio.h>
#include <meta/keybindings.h>
#include <xkbcommon/xkbcommon.h>
typedef struct _MetaKeyHandler MetaKeyHandler;
struct _MetaKeyHandler
@ -97,10 +98,10 @@ typedef struct
int max_keycode;
KeySym *keymap;
int keysyms_per_keycode;
unsigned int ignored_modifier_mask;
unsigned int hyper_mask;
unsigned int super_mask;
unsigned int meta_mask;
xkb_mod_mask_t ignored_modifier_mask;
xkb_mod_mask_t hyper_mask;
xkb_mod_mask_t super_mask;
xkb_mod_mask_t meta_mask;
MetaKeyCombo overlay_key_combo;
gboolean overlay_key_only_pressed;
MetaKeyCombo *iso_next_group_combos;