XQuartz: Remove deprecated keyboard code.
(cherry picked from commit 69cfc1a21e12bb38a6130dea2e5f20f1e6a3ee7c)
This commit is contained in:
		
							parent
							
								
									5cfcbd54d9
								
							
						
					
					
						commit
						26d8030c38
					
				| 
						 | 
				
			
			@ -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,10 +1089,11 @@ 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;
 | 
			
		||||
    
 | 
			
		||||
| 
						 | 
				
			
			@ -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;
 | 
			
		||||
| 
						 | 
				
			
			@ -1151,17 +1152,6 @@ Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info) {
 | 
			
		|||
      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;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue