summaryrefslogtreecommitdiff
path: root/xkb
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2011-05-03 03:03:06 +0100
committerPeter Hutterer <peter.hutterer@who-t.net>2011-05-06 13:15:25 +1000
commita79d4544fee806a25447d0147535ebc5a1cae6b9 (patch)
treecda3fdb587c2272eea124b221d980355aea271c8 /xkb
parentc7634498d4cd42c8571805122224dc2d0e44a585 (diff)
XKB: Send NewKeyboardNotify for dev before its master/slaves
When we change the keymap on a device, send the NewKeyboardNotify for that device before we copy the keymap to and notify for its attached master/slave devices. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'xkb')
-rw-r--r--xkb/xkb.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/xkb/xkb.c b/xkb/xkb.c
index 4d21200db..86231a895 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -5871,6 +5871,18 @@ ProcXkbGetKbdByName(ClientPtr client)
}
xkb->ctrls->num_groups= nTG;
+ nkn.deviceID= nkn.oldDeviceID= dev->id;
+ nkn.minKeyCode= new->min_key_code;
+ nkn.maxKeyCode= new->max_key_code;
+ nkn.oldMinKeyCode= xkb->min_key_code;
+ nkn.oldMaxKeyCode= xkb->max_key_code;
+ nkn.requestMajor= XkbReqCode;
+ nkn.requestMinor= X_kbGetKbdByName;
+ nkn.changed= XkbNKN_KeycodesMask;
+ if (geom_changed)
+ nkn.changed|= XkbNKN_GeometryMask;
+ XkbSendNewKeyboardNotify(dev,&nkn);
+
/* Update the map and LED info on the device itself, as well as
* any slaves if it's an MD, or its MD if it's an SD and was the
* last device used on that MD. */
@@ -5894,18 +5906,6 @@ ProcXkbGetKbdByName(ClientPtr client)
XkbFreeSrvLedInfo(old_sli);
}
}
-
- nkn.deviceID= nkn.oldDeviceID= dev->id;
- nkn.minKeyCode= new->min_key_code;
- nkn.maxKeyCode= new->max_key_code;
- nkn.oldMinKeyCode= xkb->min_key_code;
- nkn.oldMaxKeyCode= xkb->max_key_code;
- nkn.requestMajor= XkbReqCode;
- nkn.requestMinor= X_kbGetKbdByName;
- nkn.changed= XkbNKN_KeycodesMask;
- if (geom_changed)
- nkn.changed|= XkbNKN_GeometryMask;
- XkbSendNewKeyboardNotify(dev,&nkn);
}
if ((new!=NULL)&&(new!=xkb)) {
XkbFreeKeyboard(new,XkbAllComponentsMask,TRUE);