• Daniel Stone's avatar
    XKB: Remove duplicate keymap-copying loop · c7634498
    Daniel Stone authored
    Previously we had:
        foreach (device + slaves of device) {
            XkbCopyDeviceKeymap(i, device);
            [...]
        }
        if (device was last slave of its MD) {
            XkbCopyDeviceKeymap(master, device);
        }
    and now:
        foreach (device + slaves of device + MD if device was last slave) {
            XkbCopyDeviceKeymap(i, device);
            [...]
        }
    
    As an extra bonus, when changing the keymap on a slave device, we now
    ensure the LED info on the master is kept in sync.
    Signed-off-by: 's avatarDaniel Stone <daniel@fooishbar.org>
    Reviewed-by: 's avatarPeter Hutterer <peter.hutterer@who-t.net>
    c7634498
xkb.c 191 KB