xkb: xkbGetKbdByName on the lastSlave needs to change the master (#21859)
If the layout is changed on a master's lastSlave, the master needs to change layout immediately. Otherwise, the master stays on the same layout until the lastSlave changes - which may not happen if only a single keyboard is available. X.Org Bug 21859 <http://bugs.freedesktop.org/show_bug.cgi?id=21859> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
		
							parent
							
								
									219ae5b628
								
							
						
					
					
						commit
						8af2793a90
					
				
							
								
								
									
										10
									
								
								xkb/xkb.c
								
								
								
								
							
							
						
						
									
										10
									
								
								xkb/xkb.c
								
								
								
								
							|  | @ -5867,6 +5867,16 @@ ProcXkbGetKbdByName(ClientPtr client) | |||
| 	if (geom_changed) | ||||
| 	    nkn.changed|= XkbNKN_GeometryMask; | ||||
| 	XkbSendNewKeyboardNotify(dev,&nkn); | ||||
| 
 | ||||
| 	if (!IsMaster(dev) && dev->u.master) | ||||
| 	{ | ||||
| 	    DeviceIntPtr master = dev->u.master; | ||||
| 	    if (master->u.lastSlave == dev) | ||||
| 	    { | ||||
| 		XkbCopyDeviceKeymap(dev->u.master, dev); | ||||
| 		XkbSendNewKeyboardNotify(dev,&nkn); | ||||
| 	    } | ||||
| 	} | ||||
|     } | ||||
|     if ((new!=NULL)&&(new!=xkb)) { | ||||
| 	XkbFreeKeyboard(new,XkbAllComponentsMask,True); | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue