summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@freedesktop.org>2008-07-04 19:23:21 -0700
committerJeremy Huddleston <jeremyhu@freedesktop.org>2008-07-11 10:13:26 -0700
commit26d8030c3836816de8c12b2cb9d67315e5c887eb (patch)
treee1c7c4bd376d4cada9e10c39e1ad2745935d2327
parent5cfcbd54d98cc77ee02a3a099ebbad9af511a0ee (diff)
XQuartz: Remove deprecated keyboard code.
(cherry picked from commit 69cfc1a21e12bb38a6130dea2e5f20f1e6a3ee7c)
-rw-r--r--hw/xquartz/quartzKeyboard.c24
1 files changed, 7 insertions, 17 deletions
diff --git a/hw/xquartz/quartzKeyboard.c b/hw/xquartz/quartzKeyboard.c
index 5b8d32dae..40d8cbb89 100644
--- a/hw/xquartz/quartzKeyboard.c
+++ b/hw/xquartz/quartzKeyboard.c
@@ -891,6 +891,7 @@ void DarwinKeyboardInit(DeviceIntPtr pDev) {
#ifdef XQUARTZ_USE_XKB
XkbComponentNamesRec names;
bzero(&names, sizeof(names));
+ /* We need to really have rules... or something... */
XkbSetRulesDflts("base", "pc105", "us", NULL, NULL);
assert(XkbInitKeyboardDeviceStruct(pDev, &names, &keySyms, keyInfo.modMap,
QuartzBell, DarwinChangeKeyboardControl));
@@ -1088,13 +1089,14 @@ Bool LegalModifier(unsigned int key, DeviceIntPtr pDev)
unsigned int QuartzSystemKeymapSeed(void) {
static unsigned int seed;
- static KeyboardLayoutRef last_key_layout;
- KeyboardLayoutRef key_layout;
+ static TISInputSourceRef last_key_layout;
+ TISInputSourceRef key_layout;
+
+ key_layout = TISCopyCurrentKeyboardLayoutInputSource();
- KLGetCurrentKeyboardLayout (&key_layout);
if (key_layout != last_key_layout) seed++;
last_key_layout = key_layout;
-
+
return seed;
}
@@ -1136,7 +1138,6 @@ static KeySym make_dead_key(KeySym in) {
}
Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info) {
- KeyboardLayoutRef key_layout;
const void *chr_data = NULL;
int num_keycodes = NUM_KEYCODES;
UInt32 keyboard_type = 0;
@@ -1150,18 +1151,7 @@ Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info) {
CFDataRef currentKeyLayoutDataRef = (CFDataRef )TISGetInputSourceProperty(currentKeyLayoutRef, kTISPropertyUnicodeKeyLayoutData);
if (currentKeyLayoutDataRef) chr_data = CFDataGetBytePtr(currentKeyLayoutDataRef);
}
-
- if (chr_data == NULL) {
- KLGetCurrentKeyboardLayout (&key_layout);
- KLGetKeyboardLayoutProperty (key_layout, kKLuchrData, &chr_data);
- }
-
- if (chr_data == NULL) {
- KLGetKeyboardLayoutProperty (key_layout, kKLKCHRData, &chr_data);
- is_uchr = 0;
- num_keycodes = 128;
- }
-
+
if (chr_data == NULL) {
ErrorF ( "Couldn't get uchr or kchr resource\n");
return FALSE;