summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2012-05-09 20:12:18 +0100
committerDaniel Stone <daniel@fooishbar.org>2012-05-09 20:16:51 +0100
commit3e3ddd43e93f615bd783cde723032d14c834f474 (patch)
tree40343b21928ca83feef6c8daaf3d01f3f75b0980 /include
parent6433d72e7c13b7be5ed7bf227441b68b909ef46d (diff)
downloadlibxkbcommon-3e3ddd43e93f615bd783cde723032d14c834f474.tar.gz
libxkbcommon-3e3ddd43e93f615bd783cde723032d14c834f474.tar.bz2
libxkbcommon-3e3ddd43e93f615bd783cde723032d14c834f474.zip
Remove keycode_range_is_legal
It was a pretty pointless check. Also sanitise the _x11 variant to actually do what it says on the box. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Diffstat (limited to 'include')
-rw-r--r--include/xkbcommon/xkbcommon.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/include/xkbcommon/xkbcommon.h b/include/xkbcommon/xkbcommon.h
index 597948e..8ecb388 100644
--- a/include/xkbcommon/xkbcommon.h
+++ b/include/xkbcommon/xkbcommon.h
@@ -101,12 +101,7 @@ typedef uint32_t xkb_led_index_t;
#define XKB_KEYCODE_MAX (0xffffffff - 1)
#define xkb_keycode_is_legal_ext(kc) (kc <= XKB_KEYCODE_MAX)
-#define xkb_keycode_is_legal_x11(kc) (kc <= XKB_KEYCODE_MAX)
-#define xkb_keymap_keycode_range_is_legal(xkb) \
- (xkb->max_key_code > 0 && \
- xkb->max_key_code > xkb->min_key_code && \
- xkb_keycode_is_legal_ext(xkb->min_key_code) && \
- xkb_keycode_is_legal_ext(xkb->max_key_code))
+#define xkb_keycode_is_legal_x11(kc) (kc >= 8 && kc <= 255)
/**
* Names to compile a keymap with, also known as RMLVO. These names together