dix: use BUG_RETURN_VAL for pairing errors
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
This commit is contained in:
parent
642569fc79
commit
4bcf43919a
|
@ -365,14 +365,13 @@ EnableDevice(DeviceIntPtr dev, BOOL sendevent)
|
||||||
/* mode doesn't matter */
|
/* mode doesn't matter */
|
||||||
EnterWindow(dev, screenInfo.screens[0]->root, NotifyAncestor);
|
EnterWindow(dev, screenInfo.screens[0]->root, NotifyAncestor);
|
||||||
}
|
}
|
||||||
else if ((other = NextFreePointerDevice()) == NULL) {
|
else {
|
||||||
ErrorF("[dix] cannot find pointer to pair with. "
|
other = NextFreePointerDevice();
|
||||||
"This is a bug.\n");
|
BUG_RETURN_VAL_MSG(other == NULL, FALSE,
|
||||||
return FALSE;
|
"[dix] cannot find pointer to pair with.\n");
|
||||||
}
|
|
||||||
else
|
|
||||||
PairDevices(NULL, other, dev);
|
PairDevices(NULL, other, dev);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
if (dev->coreEvents)
|
if (dev->coreEvents)
|
||||||
other = (IsPointerDevice(dev)) ? inputInfo.pointer :
|
other = (IsPointerDevice(dev)) ? inputInfo.pointer :
|
||||||
|
|
Loading…
Reference in New Issue