Merge remote-tracking branch 'whot/for-keith'

This commit is contained in:
Keith Packard 2012-01-09 11:40:23 -08:00
commit 0b2c6491c5
6 changed files with 16 additions and 12 deletions

View File

@ -706,7 +706,7 @@ XIDeleteDeviceProperty (DeviceIntPtr device, Atom property, Bool fromClient)
int
XIChangeDeviceProperty (DeviceIntPtr dev, Atom property, Atom type,
int format, int mode, unsigned long len,
const pointer value, Bool sendevent)
const void *value, Bool sendevent)
{
XIPropertyPtr prop;
int size_in_bytes;

View File

@ -1292,14 +1292,17 @@ DeviceFocusEvents(DeviceIntPtr dev,
NotifyPointer);
DeviceFocusEvent(dev, XI_FocusOut, mode, NotifyNonlinear, from);
/* next call catches the root too, if the screen changed */
DeviceFocusOutEvents(dev, from->parent, NullWindow, mode,
DeviceFocusOutEvents(dev, from, NullWindow, mode,
NotifyNonlinearVirtual);
}
/* Notify all the roots */
for (i = 0; i < nscreens; i++)
DeviceFocusEvent(dev, XI_FocusIn, mode, in, screenInfo.screens[i]->root);
if (to == PointerRootWin)
{
DeviceFocusInEvents(dev, GetCurrentRootWindow(dev), sprite->win, mode, NotifyPointer);
DeviceFocusEvent(dev, XI_FocusIn, mode, NotifyPointer, sprite->win);
}
}
else
{
@ -1321,7 +1324,7 @@ DeviceFocusEvents(DeviceIntPtr dev,
if (IsParent(to, from))
{
DeviceFocusEvent(dev, XI_FocusOut, mode, NotifyAncestor, from);
DeviceFocusOutEvents(dev, from->parent, to, mode,
DeviceFocusOutEvents(dev, from, to, mode,
NotifyVirtual);
DeviceFocusEvent(dev, XI_FocusIn, mode, NotifyInferior, to);
if ((IsParent(to, sprite->win)) &&
@ -1353,7 +1356,7 @@ DeviceFocusEvents(DeviceIntPtr dev,
NotifyPointer);
DeviceFocusEvent(dev, XI_FocusOut, mode, NotifyNonlinear, from);
if (from->parent != NullWindow)
DeviceFocusOutEvents(dev, from->parent, common, mode,
DeviceFocusOutEvents(dev, from, common, mode,
NotifyNonlinearVirtual);
if (to->parent != NullWindow)
DeviceFocusInEvents(dev, common, to, mode, NotifyNonlinearVirtual);

View File

@ -1328,7 +1328,7 @@ fill_pointer_events(InternalEvent *events, DeviceIntPtr pDev, int type,
storeLastValuators(pDev, &mask, 0, 1, devx, devy);
/* Update the MD's co-ordinates, which are always in desktop space. */
if (!IsMaster(pDev) || !IsFloating(pDev)) {
if (!IsMaster(pDev) && !IsFloating(pDev)) {
DeviceIntPtr master = GetMaster(pDev, MASTER_POINTER);
master->last.valuators[0] = screenx;
master->last.valuators[1] = screeny;

View File

@ -970,15 +970,16 @@ NewInputDeviceRequest (InputOption *options, InputAttributes *attrs,
pInfo->attrs = DuplicateInputAttributes(attrs);
}
if (!pInfo->driver || !pInfo->name) {
xf86Msg(X_INFO, "No input driver/identifier specified (ignoring)\n");
if (!pInfo->name) {
xf86Msg(X_INFO, "No identifier specified, ignoring this device.\n");
rval = BadRequest;
goto unwind;
}
if (!pInfo->name) {
xf86Msg(X_ERROR, "No device identifier specified (ignoring)\n");
rval = BadMatch;
if (!pInfo->driver) {
xf86Msg(X_INFO, "No input driver specified, ignoring this device.\n");
xf86Msg(X_INFO, "This device may have been added with another device file.\n");
rval = BadRequest;
goto unwind;
}

View File

@ -92,7 +92,7 @@ extern _X_EXPORT int XIChangeDeviceProperty(
int /* format*/,
int /* mode*/,
unsigned long /* len*/,
const pointer /* value*/,
const void* /* value*/,
Bool /* sendevent*/
);

View File

@ -784,7 +784,7 @@ DeviceIntPtr kbd;
filter->active= 0;
return ((pMsg->flags&XkbSA_MessageGenKeyEvent)!=0);
}
return 0;
return 1;
}
static int