XKB: Also copy keyboard feedback when copying the keymap
When updating the XKB keymap, make sure the keyboard feedback is also copied, to preserve autorepeat settings etc. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
This commit is contained in:
		
							parent
							
								
									cf85a32b5f
								
							
						
					
					
						commit
						48dbaf173a
					
				| 
						 | 
				
			
			@ -2123,6 +2123,12 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
 | 
			
		|||
    DeviceIntPtr pDev = NULL, tmpDev = NULL;
 | 
			
		||||
    xkbMapNotify mn;
 | 
			
		||||
    xkbNewKeyboardNotify nkn;
 | 
			
		||||
    XkbEventCauseRec cause;
 | 
			
		||||
    XkbChangesRec changes;
 | 
			
		||||
    unsigned int check = 0;
 | 
			
		||||
 | 
			
		||||
    memset(&changes, 0, sizeof(changes));
 | 
			
		||||
    memset(&cause, 0, sizeof(cause));
 | 
			
		||||
 | 
			
		||||
    if (!src || !dst || src == dst)
 | 
			
		||||
        return FALSE;
 | 
			
		||||
| 
						 | 
				
			
			@ -2208,6 +2214,15 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
 | 
			
		|||
                mn.changed = XkbAllMapComponentsMask;
 | 
			
		||||
                XkbSendMapNotify(pDev, &mn);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            XkbUpdateActions(pDev, dst->min_key_code,
 | 
			
		||||
                             XkbNumKeys(pDev->key->xkbInfo->desc), &changes,
 | 
			
		||||
                             &check, &cause);
 | 
			
		||||
            if (check)
 | 
			
		||||
                XkbCheckSecondaryEffects(pDev->key->xkbInfo, check, &changes,
 | 
			
		||||
                                         &cause);
 | 
			
		||||
            memcpy(pDev->kbdfeed->ctrl.autoRepeats, dst->ctrls->per_key_repeat,
 | 
			
		||||
                   XkbPerKeyBitArraySize);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue