aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xi/exevents.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/Xi/exevents.c')
-rw-r--r--xorg-server/Xi/exevents.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/xorg-server/Xi/exevents.c b/xorg-server/Xi/exevents.c
index 1fc62968c..3acf2b5e8 100644
--- a/xorg-server/Xi/exevents.c
+++ b/xorg-server/Xi/exevents.c
@@ -113,13 +113,6 @@ XIShouldNotify(ClientPtr client, DeviceIntPtr dev)
return 0;
}
-void
-RegisterOtherDevice(DeviceIntPtr device)
-{
- device->public.processInputProc = ProcessOtherEvent;
- device->public.realInputProc = ProcessOtherEvent;
-}
-
Bool
IsPointerEvent(InternalEvent* event)
{
@@ -565,7 +558,6 @@ DeepCopyPointerClasses(DeviceIntPtr from, DeviceIntPtr to)
v->axisVal = (double*)(v->axes + from->valuator->numAxes);
v->sourceid = from->id;
- v->mode = from->valuator->mode;
} else if (to->valuator && !from->valuator)
{
ClassesPtr classes;
@@ -900,9 +892,9 @@ UpdateDeviceState(DeviceIntPtr device, DeviceEvent* event)
mask = PointerMotionMask | b->state | b->motionMask;
SetMaskForEvent(device->id, mask, MotionNotify);
} else if (event->type == ET_ProximityIn)
- device->valuator->mode &= ~OutOfProximity;
+ device->proximity->in_proximity = TRUE;
else if (event->type == ET_ProximityOut)
- device->valuator->mode |= OutOfProximity;
+ device->proximity->in_proximity = FALSE;
return DEFAULT;
}
@@ -1124,6 +1116,7 @@ InitProximityClassDeviceStruct(DeviceIntPtr dev)
if (!proxc)
return FALSE;
proxc->sourceid = dev->id;
+ proxc->in_proximity = TRUE;
dev->proximity = proxc;
return TRUE;
}
@@ -1139,7 +1132,7 @@ InitProximityClassDeviceStruct(DeviceIntPtr dev)
*/
void
InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, Atom label, int minval, int maxval,
- int resolution, int min_res, int max_res)
+ int resolution, int min_res, int max_res, int mode)
{
AxisInfoPtr ax;
@@ -1156,6 +1149,10 @@ InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, Atom label, int minval, int
ax->min_resolution = min_res;
ax->max_resolution = max_res;
ax->label = label;
+ ax->mode = mode;
+
+ if (mode & OutOfProximity)
+ dev->proximity->in_proximity = FALSE;
}
static void
@@ -1184,7 +1181,7 @@ FixDeviceStateNotify(DeviceIntPtr dev, deviceStateNotify * ev, KeyClassPtr k,
int nval = v->numAxes - first;
ev->classes_reported |= (1 << ValuatorClass);
- ev->classes_reported |= (dev->valuator->mode << ModeBitsShift);
+ ev->classes_reported |= valuator_get_mode(dev, 0) << ModeBitsShift;
ev->num_valuators = nval < 3 ? nval : 3;
switch (ev->num_valuators) {
case 3: