aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xi/exevents.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-06-15 08:55:18 +0200
committermarha <marha@users.sourceforge.net>2012-06-15 08:55:18 +0200
commitd6f64084b9bc07d0bdd527f9354f2d1d962ed16d (patch)
tree81b2652d421992fd63143a04885e332e83e18d07 /xorg-server/Xi/exevents.c
parent669b562a737c9418c53bfae69c0dbf1aabe318b4 (diff)
parent7a2af605c2c2b0d2e9bbb0b161eba8842acefbcb (diff)
downloadvcxsrv-d6f64084b9bc07d0bdd527f9354f2d1d962ed16d.tar.gz
vcxsrv-d6f64084b9bc07d0bdd527f9354f2d1d962ed16d.tar.bz2
vcxsrv-d6f64084b9bc07d0bdd527f9354f2d1d962ed16d.zip
Merge remote-tracking branch 'origin/released'
Conflicts: fontconfig/src/fcint.h fontconfig/src/fcstat.c mesalib/src/mapi/glapi/gen/GL3x.xml xorg-server/glx/glxext.h
Diffstat (limited to 'xorg-server/Xi/exevents.c')
-rw-r--r--xorg-server/Xi/exevents.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/xorg-server/Xi/exevents.c b/xorg-server/Xi/exevents.c
index 99224088e..7d7974400 100644
--- a/xorg-server/Xi/exevents.c
+++ b/xorg-server/Xi/exevents.c
@@ -928,10 +928,10 @@ UpdateDeviceState(DeviceIntPtr device, DeviceEvent *event)
else if (event->type == ET_ProximityOut)
device->proximity->in_proximity = FALSE;
else if (event->type == ET_TouchBegin) {
- BUG_WARN(!b || !v);
- BUG_WARN(!t);
+ BUG_RETURN_VAL(!b || !v, DONT_PROCESS);
+ BUG_RETURN_VAL(!t, DONT_PROCESS);
- if (!b || !t || !b->map[key])
+ if (!b->map[key])
return DONT_PROCESS;
if (!(event->flags & TOUCH_POINTER_EMULATED) ||
@@ -943,10 +943,10 @@ UpdateDeviceState(DeviceIntPtr device, DeviceEvent *event)
UpdateDeviceMotionMask(device, t->state, DeviceButtonMotionMask);
}
else if (event->type == ET_TouchEnd) {
- BUG_WARN(!b || !v);
- BUG_WARN(!t);
+ BUG_RETURN_VAL(!b || !v, DONT_PROCESS);
+ BUG_RETURN_VAL(!t, DONT_PROCESS);
- if (!b || !t || t->buttonsDown <= 0 || !b->map[key])
+ if (t->buttonsDown <= 0 || !b->map[key])
return DONT_PROCESS;
if (!(event->flags & TOUCH_POINTER_EMULATED))
@@ -1358,9 +1358,8 @@ RetrieveTouchDeliveryData(DeviceIntPtr dev, TouchPointInfoPtr ti,
wOtherInputMasks(*win)->inputClients, next)
if (xi2mask_isset(iclients->xi2mask, dev, evtype))
break;
- BUG_WARN(!iclients);
- if (!iclients)
- return FALSE;
+
+ BUG_RETURN_VAL(!iclients, FALSE);
*mask = iclients->xi2mask;
*client = rClient(iclients);
@@ -1373,9 +1372,7 @@ RetrieveTouchDeliveryData(DeviceIntPtr dev, TouchPointInfoPtr ti,
wOtherInputMasks(*win)->inputClients, next)
if (iclients->mask[dev->id] & xi_filter)
break;
- BUG_WARN(!iclients);
- if (!iclients)
- return FALSE;
+ BUG_RETURN_VAL(!iclients, FALSE);
*client = rClient(iclients);
}
@@ -1416,9 +1413,7 @@ DeliverTouchEmulatedEvent(DeviceIntPtr dev, TouchPointInfoPtr ti,
return Success;
nevents = TouchConvertToPointerEvent(ev, &motion, &button);
- BUG_WARN(nevents == 0);
- if (nevents == 0)
- return BadValue;
+ BUG_RETURN_VAL(nevents == 0, BadValue);
if (nevents > 1)
ptrev = &button;