diff options
-rw-r--r-- | Xi/exevents.c | 4 | ||||
-rw-r--r-- | dix/eventconvert.c | 10 | ||||
-rw-r--r-- | dix/events.c | 10 | ||||
-rw-r--r-- | hw/xfree86/common/xf86DGA.c | 2 | ||||
-rw-r--r-- | include/eventstr.h | 8 | ||||
-rw-r--r-- | mi/mieq.c | 12 | ||||
-rw-r--r-- | xkb/xkbAccessX.c | 2 | ||||
-rw-r--r-- | xkb/xkbPrKeyEv.c | 2 |
8 files changed, 25 insertions, 25 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c index 0211e72b7..b0e0ede6c 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -944,7 +944,7 @@ ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device) int ret = 0; int state, i; DeviceIntPtr mouse = NULL, kbd = NULL; - DeviceEvent *event = (DeviceEvent*)ev; + DeviceEvent *event = &ev->device_event; CHECKEVENT(ev); @@ -954,7 +954,7 @@ ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device) ev->any.type == ET_RawButtonRelease || ev->any.type == ET_RawMotion) { - ProcessRawEvent((RawDeviceEvent*)ev, device); + ProcessRawEvent(&ev->raw_event, device); return; } diff --git a/dix/eventconvert.c b/dix/eventconvert.c index 21eed40e1..d91ba67c2 100644 --- a/dix/eventconvert.c +++ b/dix/eventconvert.c @@ -107,7 +107,7 @@ EventToCore(InternalEvent *event, xEvent *core) case ET_KeyPress: case ET_KeyRelease: { - DeviceEvent *e = (DeviceEvent*)event; + DeviceEvent *e = &event->device_event; if (e->detail.key > 0xFF) return BadMatch; @@ -167,7 +167,7 @@ EventToXI(InternalEvent *ev, xEvent **xi, int *count) case ET_KeyRelease: case ET_ProximityIn: case ET_ProximityOut: - return eventToKeyButtonPointer((DeviceEvent*)ev, xi, count); + return eventToKeyButtonPointer(&ev->device_event, xi, count); case ET_DeviceChanged: case ET_RawKeyPress: case ET_RawKeyRelease: @@ -215,19 +215,19 @@ EventToXI2(InternalEvent *ev, xEvent **xi) case ET_ButtonRelease: case ET_KeyPress: case ET_KeyRelease: - return eventToDeviceEvent((DeviceEvent*)ev, xi); + return eventToDeviceEvent(&ev->device_event, xi); case ET_ProximityIn: case ET_ProximityOut: *xi = NULL; return BadMatch; case ET_DeviceChanged: - return eventToDeviceChanged((DeviceChangedEvent*)ev, xi); + return eventToDeviceChanged(&ev->changed_event, xi); case ET_RawKeyPress: case ET_RawKeyRelease: case ET_RawButtonPress: case ET_RawButtonRelease: case ET_RawMotion: - return eventToRawEvent((RawDeviceEvent*)ev, xi); + return eventToRawEvent(&ev->raw_event, xi); default: break; } diff --git a/dix/events.c b/dix/events.c index 0d01df512..a79cf6d2f 100644 --- a/dix/events.c +++ b/dix/events.c @@ -809,7 +809,7 @@ CheckVirtualMotion( if (qe) { - ev = (DeviceEvent*)qe->event; + ev = &qe->event->device_event; switch(ev->type) { case ET_Motion: @@ -1130,7 +1130,7 @@ EnqueueEvent(InternalEvent *ev, DeviceIntPtr device) QdEventPtr qe; SpritePtr pSprite = device->spriteInfo->sprite; int eventlen; - DeviceEvent *event = (DeviceEvent*)ev; + DeviceEvent *event = &ev->device_event; NoticeTime((InternalEvent*)event); @@ -1179,7 +1179,7 @@ EnqueueEvent(InternalEvent *ev, DeviceIntPtr device) (tail->device == device) && (tail->pScreen == pSprite->hotPhys.pScreen)) { - DeviceEvent *tailev = (DeviceEvent*)tail->event; + DeviceEvent *tailev = &tail->event->device_event; tailev->root_x = pSprite->hotPhys.x; tailev->root_y = pSprite->hotPhys.y; tailev->time = event->time; @@ -1238,7 +1238,7 @@ PlayReleasedEvents(void) will translate from sprite screen to screen 0 upon reentry to the DIX layer */ if(!noPanoramiXExtension) { - DeviceEvent *ev = (DeviceEvent*)(qe->event); + DeviceEvent *ev = &qe->event->device_event; switch(ev->type) { case ET_Motion: @@ -3993,7 +3993,7 @@ DeliverGrabbedEvent(InternalEvent *event, DeviceIntPtr thisDev, FreezeThaw(thisDev, TRUE); if (!grabinfo->sync.event) grabinfo->sync.event = xcalloc(1, sizeof(InternalEvent)); - *grabinfo->sync.event = *(DeviceEvent*)event; + *grabinfo->sync.event = event->device_event; break; } } diff --git a/hw/xfree86/common/xf86DGA.c b/hw/xfree86/common/xf86DGA.c index 8328f5875..42b7c5805 100644 --- a/hw/xfree86/common/xf86DGA.c +++ b/hw/xfree86/common/xf86DGA.c @@ -1193,7 +1193,7 @@ DGAGetOldDGAMode(int index) static void DGAHandleEvent(int screen_num, InternalEvent *ev, DeviceIntPtr device) { - DGAEvent *event= (DGAEvent*)ev; + DGAEvent *event= &ev->dga_event; ScreenPtr pScreen = screenInfo.screens[screen_num]; DGAScreenPtr pScreenPriv; diff --git a/include/eventstr.h b/include/eventstr.h index f082db34a..509982b46 100644 --- a/include/eventstr.h +++ b/include/eventstr.h @@ -221,12 +221,12 @@ union _InternalEvent { int length; /**< Length in bytes */ Time time; /**< Time in ms. */ } any; - DeviceEvent device; - DeviceChangedEvent changed; + DeviceEvent device_event; + DeviceChangedEvent changed_event; #if XFreeXDGA - DGAEvent dga; + DGAEvent dga_event; #endif - RawDeviceEvent raw; + RawDeviceEvent raw_event; }; #endif @@ -269,7 +269,7 @@ ChangeDeviceID(DeviceIntPtr dev, InternalEvent* event) case ET_ProximityOut: case ET_Hierarchy: case ET_DeviceChanged: - event->device.deviceid = dev->id; + event->device_event.deviceid = dev->id; break; #if XFreeXDGA case ET_DGAEvent: @@ -280,7 +280,7 @@ ChangeDeviceID(DeviceIntPtr dev, InternalEvent* event) case ET_RawButtonPress: case ET_RawButtonRelease: case ET_RawMotion: - event->raw.deviceid = dev->id; + event->raw_event.deviceid = dev->id; break; default: ErrorF("[mi] Unknown event type (%d), cannot change id.\n", @@ -299,11 +299,11 @@ FixUpEventForMaster(DeviceIntPtr mdev, DeviceIntPtr sdev, if (original->any.type == ET_ButtonPress || original->any.type == ET_ButtonRelease) { - int btn = original->device.detail.button; + int btn = original->device_event.detail.button; if (!sdev->button) return; /* Should never happen */ - master->device.detail.button = sdev->button->map[btn]; + master->device_event.detail.button = sdev->button->map[btn]; } } @@ -382,8 +382,8 @@ mieqProcessDeviceEvent(DeviceIntPtr dev, case ET_ButtonRelease: if (dev && screen && screen != DequeueScreen(dev) && !handler) { DequeueScreen(dev) = screen; - x = event->device.root_x; - y = event->device.root_y; + x = event->device_event.root_x; + y = event->device_event.root_y; NewCurrentScreen (dev, DequeueScreen(dev), x, y); } break; diff --git a/xkb/xkbAccessX.c b/xkb/xkbAccessX.c index fd30a1ce7..2fc764290 100644 --- a/xkb/xkbAccessX.c +++ b/xkb/xkbAccessX.c @@ -690,7 +690,7 @@ XkbSrvInfoPtr xkbi = NULL; unsigned changed = 0; ProcessInputProc backupproc; xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(mouse); -DeviceEvent *event = (DeviceEvent*)ev; +DeviceEvent *event = &ev->device_event; dev = (IsMaster(mouse) || mouse->u.master) ? GetMaster(mouse, MASTER_KEYBOARD) : mouse; diff --git a/xkb/xkbPrKeyEv.c b/xkb/xkbPrKeyEv.c index 8f6705f9f..630f17c23 100644 --- a/xkb/xkbPrKeyEv.c +++ b/xkb/xkbPrKeyEv.c @@ -148,7 +148,7 @@ ProcessKeyboardEvent(InternalEvent *ev, DeviceIntPtr keybd) XkbSrvInfoPtr xkbi = NULL; ProcessInputProc backup_proc; xkbDeviceInfoPtr xkb_priv = XKBDEVICEINFO(keybd); - DeviceEvent *event = (DeviceEvent*)ev; + DeviceEvent *event = &ev->device_event; int is_press = (event->type == ET_KeyPress); int is_release = (event->type == ET_KeyRelease); |