diff options
author | Keith Packard <keithp@keithp.com> | 2011-05-13 13:59:36 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-05-13 13:59:36 -0700 |
commit | ba5540221f2a46133371b4ff0d527b1a0a1443b1 (patch) | |
tree | 1d73f6481930f1ca9318f0b42b9ae7309d4ff145 /hw/xfree86 | |
parent | 6347a0b802812bb185ada1bf0951add306935184 (diff) | |
parent | 728d0bf20ed8e2612b100fca6526705fa6e1eef4 (diff) |
Merge remote-tracking branch 'whot/for-keith'
Diffstat (limited to 'hw/xfree86')
-rw-r--r-- | hw/xfree86/common/xf86Events.c | 6 | ||||
-rw-r--r-- | hw/xfree86/common/xf86Init.c | 2 | ||||
-rw-r--r-- | hw/xfree86/common/xf86Priv.h | 3 | ||||
-rw-r--r-- | hw/xfree86/common/xf86Xinput.c | 43 |
4 files changed, 12 insertions, 42 deletions
diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c index 3006ad183..c4a4db9be 100644 --- a/hw/xfree86/common/xf86Events.c +++ b/hw/xfree86/common/xf86Events.c @@ -376,7 +376,7 @@ static void xf86ReleaseKeys(DeviceIntPtr pDev) { KeyClassPtr keyc; - int i, j, nevents, sigstate; + int i, sigstate; if (!pDev || !pDev->key) return; @@ -399,9 +399,7 @@ xf86ReleaseKeys(DeviceIntPtr pDev) i++) { if (key_is_down(pDev, i, KEY_POSTED)) { sigstate = xf86BlockSIGIO (); - nevents = GetKeyboardEvents(xf86Events, pDev, KeyRelease, i, NULL); - for (j = 0; j < nevents; j++) - mieqEnqueue(pDev, (InternalEvent*)(xf86Events + j)->event); + QueueKeyboardEvents(pDev, KeyRelease, i, NULL); xf86UnblockSIGIO(sigstate); } } diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index 0b36163c0..53f763aaf 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -806,8 +806,6 @@ InitInput(int argc, char **argv) mieqInit(); - GetEventList(&xf86Events); - /* Initialize all configured input devices */ for (pDev = xf86ConfigLayout.inputs; pDev && *pDev; pDev++) { /* Replace obsolete keyboard driver with kbd */ diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h index 7137a5363..5d91ab367 100644 --- a/hw/xfree86/common/xf86Priv.h +++ b/hw/xfree86/common/xf86Priv.h @@ -148,9 +148,6 @@ extern _X_EXPORT int xf86SetVerbosity(int verb); extern _X_EXPORT int xf86SetLogVerbosity(int verb); extern _X_EXPORT Bool xf86CallDriverProbe( struct _DriverRec * drv, Bool detect_only ); -/* xf86Xinput.c */ -extern _X_EXPORT EventList *xf86Events; - #endif /* _NO_XF86_PROTOTYPES */ diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index ef4542c5f..e7e1ce1f0 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -99,8 +99,6 @@ return; \ } -EventListPtr xf86Events = NULL; - static int xf86InputDevicePostInit(DeviceIntPtr dev); @@ -329,8 +327,8 @@ xf86ActivateDevice(InputInfoPtr pInfo) dev->config_info = xf86SetStrOption(pInfo->options, "config_info", NULL); if (serverGeneration == 1) - xf86Msg(X_INFO, "XINPUT: Adding extended input device \"%s\" (type: %s)\n", - pInfo->name, pInfo->type_name); + xf86Msg(X_INFO, "XINPUT: Adding extended input device \"%s\" (type: %s, id %d)\n", + pInfo->name, pInfo->type_name, dev->id); return dev; } @@ -1012,7 +1010,6 @@ xf86PostMotionEventM(DeviceIntPtr device, int is_absolute, const ValuatorMask *mask) { - int i = 0, nevents = 0; int flags = 0; if (valuator_mask_num_valuators(mask) > 0) @@ -1050,11 +1047,7 @@ xf86PostMotionEventM(DeviceIntPtr device, } #endif - nevents = GetPointerEvents(xf86Events, device, MotionNotify, 0, flags, mask); - - for (i = 0; i < nevents; i++) { - mieqEnqueue(device, (InternalEvent*)((xf86Events + i)->event)); - } + QueuePointerEvents(device, MotionNotify, 0, flags, mask); } void @@ -1099,13 +1092,7 @@ xf86PostProximityEventM(DeviceIntPtr device, int is_in, const ValuatorMask *mask) { - int i, nevents; - - nevents = GetProximityEvents(xf86Events, device, - is_in ? ProximityIn : ProximityOut, mask); - for (i = 0; i < nevents; i++) - mieqEnqueue(device, (InternalEvent*)((xf86Events + i)->event)); - + QueueProximityEvents(device, is_in ? ProximityIn : ProximityOut, mask); } void @@ -1157,7 +1144,6 @@ xf86PostButtonEventM(DeviceIntPtr device, int is_down, const ValuatorMask *mask) { - int i = 0, nevents = 0; int flags = 0; if (valuator_mask_num_valuators(mask) > 0) @@ -1177,13 +1163,9 @@ xf86PostButtonEventM(DeviceIntPtr device, } #endif - nevents = GetPointerEvents(xf86Events, device, - is_down ? ButtonPress : ButtonRelease, button, - flags, mask); - - for (i = 0; i < nevents; i++) - mieqEnqueue(device, (InternalEvent*)((xf86Events + i)->event)); - + QueuePointerEvents(device, + is_down ? ButtonPress : ButtonRelease, button, + flags, mask); } void @@ -1235,8 +1217,6 @@ xf86PostKeyEventM(DeviceIntPtr device, int is_absolute, const ValuatorMask *mask) { - int i = 0, nevents = 0; - #if XFreeXDGA DeviceIntPtr pointer; @@ -1250,12 +1230,9 @@ xf86PostKeyEventM(DeviceIntPtr device, } #endif - nevents = GetKeyboardEvents(xf86Events, device, - is_down ? KeyPress : KeyRelease, - key_code, mask); - - for (i = 0; i < nevents; i++) - mieqEnqueue(device, (InternalEvent*)((xf86Events + i)->event)); + QueueKeyboardEvents(device, + is_down ? KeyPress : KeyRelease, + key_code, mask); } void |