diff options
-rw-r--r-- | dix/devices.c | 12 | ||||
-rw-r--r-- | dix/events.c | 4 | ||||
-rw-r--r-- | dix/inpututils.c | 6 | ||||
-rw-r--r-- | include/inputstr.h | 6 | ||||
-rw-r--r-- | mi/mieq.c | 2 | ||||
-rw-r--r-- | test/xi2/protocol-xiquerypointer.c | 2 | ||||
-rw-r--r-- | test/xi2/protocol-xiwarppointer.c | 2 | ||||
-rw-r--r-- | xkb/xkb.c | 2 | ||||
-rw-r--r-- | xkb/xkbActions.c | 2 |
9 files changed, 18 insertions, 20 deletions
diff --git a/dix/devices.c b/dix/devices.c index 058f32b05..8fb06bbfa 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -457,8 +457,8 @@ DisableDevice(DeviceIntPtr dev, BOOL sendevent) { for (other = inputInfo.devices; other; other = other->next) { - if (IsMaster(other) && other->u.lastSlave == dev) - other->u.lastSlave = NULL; + if (IsMaster(other) && other->lastSlave == dev) + other->lastSlave = NULL; } } @@ -988,7 +988,7 @@ CloseDownDevices(void) for (dev = inputInfo.devices; dev; dev = dev->next) { if (!IsMaster(dev) && !IsFloating(dev)) - dev->u.master = NULL; + dev->master = NULL; } CloseDeviceList(&inputInfo.devices); @@ -2486,7 +2486,7 @@ GetMaster(DeviceIntPtr dev, int which) if (IsMaster(dev)) master = dev; else - master = dev->u.master; + master = dev->master; if (master && which != MASTER_ATTACHED) { @@ -2541,7 +2541,7 @@ AllocDevicePair (ClientPtr client, char* name, pointer->coreEvents = TRUE; pointer->spriteInfo->spriteOwner = TRUE; - pointer->u.lastSlave = NULL; + pointer->lastSlave = NULL; pointer->last.slave = NULL; pointer->type = (master) ? MASTER_POINTER : SLAVE; @@ -2567,7 +2567,7 @@ AllocDevicePair (ClientPtr client, char* name, keyboard->coreEvents = TRUE; keyboard->spriteInfo->spriteOwner = FALSE; - keyboard->u.lastSlave = NULL; + keyboard->lastSlave = NULL; keyboard->last.slave = NULL; keyboard->type = (master) ? MASTER_KEYBOARD : SLAVE; diff --git a/dix/events.c b/dix/events.c index 8b3bfb791..f39d8a90b 100644 --- a/dix/events.c +++ b/dix/events.c @@ -3244,8 +3244,8 @@ ProcWarpPointer(ClientPtr client) } } - if (dev->u.lastSlave) - dev = dev->u.lastSlave; + if (dev->lastSlave) + dev = dev->lastSlave; pSprite = dev->spriteInfo->sprite; #ifdef PANORAMIX diff --git a/dix/inpututils.c b/dix/inpututils.c index abeabf229..077ffce01 100644 --- a/dix/inpututils.c +++ b/dix/inpututils.c @@ -273,10 +273,10 @@ change_modmap(ClientPtr client, DeviceIntPtr dev, KeyCode *modkeymap, do_modmap_change(client, tmp, modmap); } } - else if (!IsFloating(dev) && GetMaster(dev, MASTER_KEYBOARD)->u.lastSlave == dev) { + else if (!IsFloating(dev) && GetMaster(dev, MASTER_KEYBOARD)->lastSlave == dev) { /* If this fails, expect the results to be weird. */ - if (check_modmap_change(client, dev->u.master, modmap)) - do_modmap_change(client, dev->u.master, modmap); + if (check_modmap_change(client, dev->master, modmap)) + do_modmap_change(client, dev->master, modmap); } return Success; diff --git a/include/inputstr.h b/include/inputstr.h index 58d318fd6..4c67e3dea 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -530,10 +530,8 @@ typedef struct _DeviceIntRec { PrivateRec *devPrivates; DeviceUnwrapProc unwrapProc; SpriteInfoPtr spriteInfo; - union { - DeviceIntPtr master; /* master device */ - DeviceIntPtr lastSlave; /* last slave device used */ - } u; + DeviceIntPtr master; /* master device */ + DeviceIntPtr lastSlave; /* last slave device used */ /* last valuator values recorded, not posted to client; * for slave devices, valuators is in device coordinates @@ -402,7 +402,7 @@ mieqProcessDeviceEvent(DeviceIntPtr dev, master = CopyGetMasterEvent(dev, event, &mevent); if (master) - master->u.lastSlave = dev; + master->lastSlave = dev; /* If someone's registered a custom event handler, let them * steal it. */ diff --git a/test/xi2/protocol-xiquerypointer.c b/test/xi2/protocol-xiquerypointer.c index 810c61575..a42d59515 100644 --- a/test/xi2/protocol-xiquerypointer.c +++ b/test/xi2/protocol-xiquerypointer.c @@ -185,7 +185,7 @@ static void test_XIQueryPointer(void) request_XIQueryPointer(&client_request, &request, BadDevice); test_data.dev = devices.mouse; - devices.mouse->u.master = NULL; /* Float, kind-of */ + devices.mouse->master = NULL; /* Float, kind-of */ request.deviceid = devices.mouse->id; request_XIQueryPointer(&client_request, &request, Success); diff --git a/test/xi2/protocol-xiwarppointer.c b/test/xi2/protocol-xiwarppointer.c index 4f8860ea0..75b7617a0 100644 --- a/test/xi2/protocol-xiwarppointer.c +++ b/test/xi2/protocol-xiwarppointer.c @@ -145,7 +145,7 @@ static void test_XIWarpPointer(void) request.deviceid = devices.kbd->id; request_XIWarpPointer(&client_request, &request, BadDevice); - devices.mouse->u.master = NULL; /* Float, kind-of */ + devices.mouse->master = NULL; /* Float, kind-of */ request.deviceid = devices.mouse->id; request_XIWarpPointer(&client_request, &request, Success); @@ -5885,7 +5885,7 @@ ProcXkbGetKbdByName(ClientPtr client) if (!IsMaster(dev)) { DeviceIntPtr master = GetMaster(dev, MASTER_KEYBOARD); - if (master && master->u.lastSlave == dev) { + if (master && master->lastSlave == dev) { XkbCopyDeviceKeymap(master, dev); XkbSendNewKeyboardNotify(dev,&nkn); } diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c index eda409c07..65c678af8 100644 --- a/xkb/xkbActions.c +++ b/xkb/xkbActions.c @@ -1365,7 +1365,7 @@ InjectPointerKeyEvents(DeviceIntPtr dev, int type, int button, int flags, Valuat if (IsMaster(dev)) { mpointer = GetMaster(dev, MASTER_POINTER); - lastSlave = mpointer->u.lastSlave; + lastSlave = mpointer->lastSlave; ptr = GetXTestDevice(mpointer); } else if (IsFloating(dev)) ptr = dev; |