aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/common
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xfree86/common')
-rw-r--r--xorg-server/hw/xfree86/common/xf86Events.c6
-rw-r--r--xorg-server/hw/xfree86/common/xf86Init.c2
-rw-r--r--xorg-server/hw/xfree86/common/xf86Priv.h3
-rw-r--r--xorg-server/hw/xfree86/common/xf86Xinput.c43
4 files changed, 12 insertions, 42 deletions
diff --git a/xorg-server/hw/xfree86/common/xf86Events.c b/xorg-server/hw/xfree86/common/xf86Events.c
index 3006ad183..c4a4db9be 100644
--- a/xorg-server/hw/xfree86/common/xf86Events.c
+++ b/xorg-server/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/xorg-server/hw/xfree86/common/xf86Init.c b/xorg-server/hw/xfree86/common/xf86Init.c
index 0b36163c0..53f763aaf 100644
--- a/xorg-server/hw/xfree86/common/xf86Init.c
+++ b/xorg-server/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/xorg-server/hw/xfree86/common/xf86Priv.h b/xorg-server/hw/xfree86/common/xf86Priv.h
index 7137a5363..5d91ab367 100644
--- a/xorg-server/hw/xfree86/common/xf86Priv.h
+++ b/xorg-server/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/xorg-server/hw/xfree86/common/xf86Xinput.c b/xorg-server/hw/xfree86/common/xf86Xinput.c
index ef4542c5f..e7e1ce1f0 100644
--- a/xorg-server/hw/xfree86/common/xf86Xinput.c
+++ b/xorg-server/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