XKB: Send XKB events for all devices to all clients
We were using XIShouldNotify(client, device) as a test for whether or not to send XKB map/state/etc changed events, which limits it to only sending events for the current ClientPointer/ClientKeyboard for that client. While this makes perfect sense for core events (e.g. MappingNotify), XKB events carry a device ID, so are safe to send to all clients for all devices. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
a79d4544fe
commit
460a377ef2
|
@ -164,9 +164,6 @@ XkbSendNewKeyboardNotify(DeviceIntPtr kbd,xkbNewKeyboardNotify *pNKN)
|
|||
if (!(clients[i]->newKeyboardNotifyMask & changed))
|
||||
continue;
|
||||
|
||||
if (!XIShouldNotify(clients[i], kbd))
|
||||
continue;
|
||||
|
||||
pNKN->sequenceNumber = clients[i]->sequence;
|
||||
pNKN->time = time;
|
||||
pNKN->changed = changed;
|
||||
|
@ -232,8 +229,7 @@ register CARD16 changed,bState;
|
|||
if ((!interest->client->clientGone) &&
|
||||
(interest->client->requestVector != InitialVector) &&
|
||||
(interest->client->xkbClientFlags&_XkbClientInitialized) &&
|
||||
(interest->stateNotifyMask&changed) &&
|
||||
XIShouldNotify(interest->client,kbd)) {
|
||||
(interest->stateNotifyMask&changed)) {
|
||||
pSN->sequenceNumber = interest->client->sequence;
|
||||
pSN->time = time;
|
||||
pSN->changed = changed;
|
||||
|
@ -280,9 +276,6 @@ XkbSendMapNotify(DeviceIntPtr kbd, xkbMapNotify *pMN)
|
|||
if (!(clients[i]->mapNotifyMask & changed))
|
||||
continue;
|
||||
|
||||
if (!XIShouldNotify(clients[i], kbd))
|
||||
continue;
|
||||
|
||||
pMN->time = time;
|
||||
pMN->sequenceNumber = clients[i]->sequence;
|
||||
pMN->changed = changed;
|
||||
|
@ -401,8 +394,7 @@ Time time = 0;
|
|||
if ((!interest->client->clientGone) &&
|
||||
(interest->client->requestVector != InitialVector) &&
|
||||
(interest->client->xkbClientFlags&_XkbClientInitialized) &&
|
||||
(interest->ctrlsNotifyMask&changedControls) &&
|
||||
XIShouldNotify(interest->client, kbd)) {
|
||||
(interest->ctrlsNotifyMask&changedControls)) {
|
||||
if (!initialized) {
|
||||
pCN->type = XkbEventCode + XkbEventBase;
|
||||
pCN->xkbType = XkbControlsNotify;
|
||||
|
@ -450,7 +442,6 @@ CARD32 state,changed;
|
|||
if ((!interest->client->clientGone) &&
|
||||
(interest->client->requestVector != InitialVector) &&
|
||||
(interest->client->xkbClientFlags&_XkbClientInitialized) &&
|
||||
XIShouldNotify(interest->client, kbd) &&
|
||||
(((xkbType==XkbIndicatorStateNotify)&&
|
||||
(interest->iStateNotifyMask&changed))||
|
||||
((xkbType==XkbIndicatorMapNotify)&&
|
||||
|
@ -534,8 +525,7 @@ XID winID = 0;
|
|||
if ((!interest->client->clientGone) &&
|
||||
(interest->client->requestVector != InitialVector) &&
|
||||
(interest->client->xkbClientFlags&_XkbClientInitialized) &&
|
||||
(interest->bellNotifyMask) &&
|
||||
XIShouldNotify(interest->client,kbd)) {
|
||||
(interest->bellNotifyMask)) {
|
||||
if (!initialized) {
|
||||
time = GetTimeInMillis();
|
||||
bn.type = XkbEventCode + XkbEventBase;
|
||||
|
@ -589,8 +579,7 @@ CARD16 sk_delay,db_delay;
|
|||
if ((!interest->client->clientGone) &&
|
||||
(interest->client->requestVector != InitialVector) &&
|
||||
(interest->client->xkbClientFlags&_XkbClientInitialized) &&
|
||||
(interest->accessXNotifyMask&(1<<pEv->detail)) &&
|
||||
XIShouldNotify(interest->client, kbd)) {
|
||||
(interest->accessXNotifyMask&(1<<pEv->detail))) {
|
||||
if (!initialized) {
|
||||
pEv->type = XkbEventCode + XkbEventBase;
|
||||
pEv->xkbType = XkbAccessXNotify;
|
||||
|
@ -637,8 +626,7 @@ CARD32 changedIndicators;
|
|||
if ((!interest->client->clientGone) &&
|
||||
(interest->client->requestVector != InitialVector) &&
|
||||
(interest->client->xkbClientFlags&_XkbClientInitialized) &&
|
||||
(interest->namesNotifyMask&pEv->changed) &&
|
||||
XIShouldNotify(interest->client, kbd)) {
|
||||
(interest->namesNotifyMask&pEv->changed)) {
|
||||
if (!initialized) {
|
||||
pEv->type = XkbEventCode + XkbEventBase;
|
||||
pEv->xkbType = XkbNamesNotify;
|
||||
|
@ -683,8 +671,7 @@ CARD16 firstSI = 0, nSI = 0, nTotalSI = 0;
|
|||
if ((!interest->client->clientGone) &&
|
||||
(interest->client->requestVector != InitialVector) &&
|
||||
(interest->client->xkbClientFlags&_XkbClientInitialized) &&
|
||||
(interest->compatNotifyMask) &&
|
||||
XIShouldNotify(interest->client, kbd)) {
|
||||
(interest->compatNotifyMask)) {
|
||||
if (!initialized) {
|
||||
pEv->type = XkbEventCode + XkbEventBase;
|
||||
pEv->xkbType = XkbCompatMapNotify;
|
||||
|
@ -736,8 +723,7 @@ Time time = 0;
|
|||
if ((!interest->client->clientGone) &&
|
||||
(interest->client->requestVector != InitialVector) &&
|
||||
(interest->client->xkbClientFlags&_XkbClientInitialized) &&
|
||||
(interest->actionMessageMask) &&
|
||||
XIShouldNotify(interest->client, kbd)) {
|
||||
(interest->actionMessageMask)) {
|
||||
if (!initialized) {
|
||||
pEv->type = XkbEventCode + XkbEventBase;
|
||||
pEv->xkbType = XkbActionMessage;
|
||||
|
@ -783,8 +769,7 @@ CARD16 reason;
|
|||
if ((!interest->client->clientGone) &&
|
||||
(interest->client->requestVector != InitialVector) &&
|
||||
(interest->client->xkbClientFlags&_XkbClientInitialized) &&
|
||||
(interest->extDevNotifyMask&reason) &&
|
||||
XIShouldNotify(interest->client, dev)) {
|
||||
(interest->extDevNotifyMask&reason)) {
|
||||
if (!initialized) {
|
||||
pEv->type = XkbEventCode + XkbEventBase;
|
||||
pEv->xkbType = XkbExtensionDeviceNotify;
|
||||
|
|
Loading…
Reference in New Issue
Block a user